Méthode | Description | |
---|---|---|
GetStream ( ) : |
Retrieve a new MemoryStream object with no tag and a default initial capacity.
|
|
GetStream ( string tag ) : |
Retrieve a new MemoryStream object with the given tag and a default initial capacity.
|
|
GetStream ( string tag, byte buffer, int offset, int count ) : |
Retrieve a new MemoryStream object with the given tag and with contents copied from the provided buffer. The provided buffer is not wrapped or used after construction. The new stream's position is set to the beginning of the stream when returned. |
|
GetStream ( string tag, int requiredSize ) : |
Retrieve a new MemoryStream object with the given tag and at least the given capacity.
|
|
GetStream ( string tag, int requiredSize, bool asContiguousBuffer ) : |
Retrieve a new MemoryStream object with the given tag and at least the given capacity, possibly using a single continugous underlying buffer. Retrieving a MemoryStream which provides a single contiguous buffer can be useful in situations where the initial size is known and it is desirable to avoid copying data between the smaller underlying buffers to a single large one. This is most helpful when you know that you will always call GetBuffer on the underlying stream. |
|
RecyclableMemoryStreamManager ( ) : System |
Initializes the memory manager with the default block/buffer specifications.
|
|
RecyclableMemoryStreamManager ( int blockSize, int largeBufferMultiple, int maximumBufferSize ) : System |
Initializes the memory manager with the given block requiredSize.
|
Méthode | Description | |
---|---|---|
GetBlock ( ) : byte[] |
Removes and returns a single block from the pool.
|
|
GetLargeBuffer ( int requiredSize, string tag ) : byte[] |
Returns a buffer of arbitrary size from the large buffer pool. This buffer will be at least the requiredSize and always be a multiple of largeBufferMultiple.
|
|
IsLargeBufferMultiple ( int value ) : bool | ||
ReportStreamCreated ( ) : void | ||
ReportStreamDisposed ( ) : void | ||
ReportStreamFinalized ( ) : void | ||
ReportStreamLength ( long bytes ) : void | ||
ReportStreamToArray ( ) : void | ||
ReturnBlocks ( ICollection |
Returns the blocks to the pool
|
|
ReturnLargeBuffer ( byte buffer, string tag ) : void |
Returns the buffer to the large pool
|
|
RoundToLargeBufferMultiple ( int requiredSize ) : int |
public GetStream ( string tag ) : |
||
tag | string | A tag which can be used to track the source of the stream. |
Résultat |
public GetStream ( string tag, byte buffer, int offset, int count ) : |
||
tag | string | A tag which can be used to track the source of the stream. |
buffer | byte | The byte buffer to copy data from. |
offset | int | The offset from the start of the buffer to copy from. |
count | int | The number of bytes to copy from the buffer. |
Résultat |
public GetStream ( string tag, int requiredSize ) : |
||
tag | string | A tag which can be used to track the source of the stream. |
requiredSize | int | The minimum desired capacity for the stream. |
Résultat |
public GetStream ( string tag, int requiredSize, bool asContiguousBuffer ) : |
||
tag | string | A tag which can be used to track the source of the stream. |
requiredSize | int | The minimum desired capacity for the stream. |
asContiguousBuffer | bool | Whether to attempt to use a single contiguous buffer. |
Résultat |
public RecyclableMemoryStreamManager ( ) : System | ||
Résultat | System |
public RecyclableMemoryStreamManager ( int blockSize, int largeBufferMultiple, int maximumBufferSize ) : System | ||
blockSize | int | Size of each block that is pooled. Must be > 0. |
largeBufferMultiple | int | Each large buffer will be a multiple of this value. |
maximumBufferSize | int | Buffers larger than this are not pooled |
Résultat | System |