Interface IMemoryStreamManager
Wrapper interface for Microsoft.IO.RecyclableMemoryStreamManager.
Namespace: Tableau.Migration
Assembly: Tableau.Migration.dll
Syntax
public interface IMemoryStreamManager
Properties
Inner
Gets the wrapped Microsoft.IO.RecyclableMemoryStreamManager instance.
Declaration
RecyclableMemoryStreamManager Inner { get; }
Property Value
Type | Description |
---|---|
RecyclableMemoryStreamManager |
Settings
Gets the settings for configuring stream behavior.
Declaration
RecyclableMemoryStreamManager.Options Settings { get; }
Property Value
Type | Description |
---|---|
RecyclableMemoryStreamManager.Options |
Methods
GetStream()
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with no tag and a default initial capacity.
Declaration
RecyclableMemoryStream GetStream()
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
GetStream(byte[])
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with the contents copied from the provided buffer. The provided buffer is not wrapped or used after construction.
Declaration
RecyclableMemoryStream GetStream(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
byte[] | buffer | The byte buffer to copy data from. |
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
The new stream's position is set to the beginning of the stream when returned.
GetStream(Guid)
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with no tag and a default initial capacity.
Declaration
RecyclableMemoryStream GetStream(Guid id)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | A unique identifier which can be used to trace usages of the stream. |
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
GetStream(Guid, string?)
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with the given tag and a default initial capacity.
Declaration
RecyclableMemoryStream GetStream(Guid id, string? tag)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | A unique identifier which can be used to trace usages of the stream. |
string | tag | A tag which can be used to track the source of the stream. |
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
GetStream(Guid, string?, byte[], int, int)
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with the given tag and with contents copied from the provided buffer. The provided buffer is not wrapped or used after construction.
Declaration
RecyclableMemoryStream GetStream(Guid id, string? tag, byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | A unique identifier which can be used to trace usages of the stream. |
string | tag | A tag which can be used to track the source of the stream. |
byte[] | buffer | The byte buffer to copy data from. |
int | offset | The offset from the start of the buffer to copy from. |
int | count | The number of bytes to copy from the buffer. |
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
The new stream's position is set to the beginning of the stream when returned.
GetStream(Guid, string?, long)
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with the given tag and at least the given capacity.
Declaration
RecyclableMemoryStream GetStream(Guid id, string? tag, long requiredSize)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | A unique identifier which can be used to trace usages of the stream. |
string | tag | A tag which can be used to track the source of the stream. |
long | requiredSize | The minimum desired capacity for the stream. |
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
GetStream(Guid, string?, long, bool)
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with the given tag and at least the given capacity, possibly using a single contiguous underlying buffer.
Declaration
RecyclableMemoryStream GetStream(Guid id, string? tag, long requiredSize, bool asContiguousBuffer)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | A unique identifier which can be used to trace usages of the stream. |
string | tag | A tag which can be used to track the source of the stream. |
long | requiredSize | The minimum desired capacity for the stream. |
bool | asContiguousBuffer | Whether to attempt to use a single contiguous buffer. |
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
Retrieving a Microsoft.IO.RecyclableMemoryStream 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 Microsoft.IO.RecyclableMemoryStream.GetBuffer() on the underlying stream.
GetStream(Guid, string?, ReadOnlySpan<byte>)
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with the given tag and with contents copied from the provided buffer. The provided buffer is not wrapped or used after construction.
Declaration
RecyclableMemoryStream GetStream(Guid id, string? tag, ReadOnlySpan<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | A unique identifier which can be used to trace usages of the stream. |
string | tag | A tag which can be used to track the source of the stream. |
ReadOnlySpan<byte> | buffer | The byte buffer to copy data from. |
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
The new stream's position is set to the beginning of the stream when returned.
GetStream(ReadOnlySpan<byte>)
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with the contents copied from the provided buffer. The provided buffer is not wrapped or used after construction.
Declaration
RecyclableMemoryStream GetStream(ReadOnlySpan<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<byte> | buffer | The byte buffer to copy data from. |
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
The new stream's position is set to the beginning of the stream when returned.
GetStream(string?)
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with the given tag and a default initial capacity.
Declaration
RecyclableMemoryStream GetStream(string? tag)
Parameters
Type | Name | Description |
---|---|---|
string | tag | A tag which can be used to track the source of the stream. |
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
GetStream(string?, byte[], int, int)
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with the given tag and with contents copied from the provided buffer. The provided buffer is not wrapped or used after construction.
Declaration
RecyclableMemoryStream GetStream(string? tag, byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
string | tag | A tag which can be used to track the source of the stream. |
byte[] | buffer | The byte buffer to copy data from. |
int | offset | The offset from the start of the buffer to copy from. |
int | count | The number of bytes to copy from the buffer. |
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
The new stream's position is set to the beginning of the stream when returned.
GetStream(string?, long)
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with the given tag and at least the given capacity.
Declaration
RecyclableMemoryStream GetStream(string? tag, long requiredSize)
Parameters
Type | Name | Description |
---|---|---|
string | tag | A tag which can be used to track the source of the stream. |
long | requiredSize | The minimum desired capacity for the stream. |
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
GetStream(string?, long, bool)
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with the given tag and at least the given capacity, possibly using a single contiguous underlying buffer.
Declaration
RecyclableMemoryStream GetStream(string? tag, long requiredSize, bool asContiguousBuffer)
Parameters
Type | Name | Description |
---|---|---|
string | tag | A tag which can be used to track the source of the stream. |
long | requiredSize | The minimum desired capacity for the stream. |
bool | asContiguousBuffer | Whether to attempt to use a single contiguous buffer. |
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
Retrieving a Microsoft.IO.RecyclableMemoryStream 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 Microsoft.IO.RecyclableMemoryStream.GetBuffer() on the underlying stream.
GetStream(string?, ReadOnlySpan<byte>)
Retrieve a new Microsoft.IO.RecyclableMemoryStream object with the given tag and with contents copied from the provided buffer. The provided buffer is not wrapped or used after construction.
Declaration
RecyclableMemoryStream GetStream(string? tag, ReadOnlySpan<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
string | tag | A tag which can be used to track the source of the stream. |
ReadOnlySpan<byte> | buffer | The byte buffer to copy data from. |
Returns
Type | Description |
---|---|
RecyclableMemoryStream | A Microsoft.IO.RecyclableMemoryStream. |
Remarks
The stream's ID and tag are used for tracking purposes and not for caching.
The new stream's position is set to the beginning of the stream when returned.