[]
Initializes a new instance of the DataStream class, using a managed buffer as a backing store.
public static DataStream Create<T>(T[] userBuffer, bool canRead, bool canWrite, int index = 0, bool pinBuffer = true) where T : struct
Type | Name | Description |
---|---|---|
T[] | userBuffer | A managed array to be used as a backing store. |
bool | canRead |
|
bool | canWrite |
|
int | index | Index inside the buffer in terms of element count (not size in bytes). |
bool | pinBuffer | True to keep the managed buffer and pin it, false will allocate unmanaged memory and make a copy of it. Default is true. |
Type | Description |
---|---|
DataStream |
Name | Description |
---|---|
T |