Class BlittableTransferObject<T>
Represents a value of blittable type as DTO.
Implements
Inherited Members
Namespace: DotNext.IO
Assembly: DotNext.IO.dll
Syntax
public class BlittableTransferObject<T> : MemoryManager<byte>, IMemoryOwner<byte>, IDisposable, IPinnable, ISerializable<BlittableTransferObject<T>>, IDataTransferObject, IBinaryFormattable<BlittableTransferObject<T>> where T : unmanaged
Type Parameters
Name | Description |
---|---|
T | The blittable type. |
Properties
| Edit this page View SourceContent
Gets the content of this object.
Declaration
public ref T Content { get; }
Property Value
Type | Description |
---|---|
T |
Methods
| Edit this page View SourceDispose(bool)
Releases all resources used by the current memory manager.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Overrides
| Edit this page View SourceGetSpan()
Returns a memory span that wraps the underlying memory buffer.
Declaration
public override sealed Span<byte> GetSpan()
Returns
Type | Description |
---|---|
Span<byte> | A memory span that wraps the underlying memory buffer. |
Overrides
| Edit this page View SourcePin(int)
Returns a handle to the memory that has been pinned and whose address can be taken.
Declaration
public override sealed MemoryHandle Pin(int elementIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
int | elementIndex | The offset to the element in the memory buffer at which the returned MemoryHandle points. |
Returns
Type | Description |
---|---|
MemoryHandle | A handle to the memory that has been pinned. |
Overrides
| Edit this page View SourceUnpin()
Unpins pinned memory so that the garbage collector is free to move it.
Declaration
public override sealed void Unpin()