Show / Hide Table of Contents

Class BlittableTransferObject<T>

Represents a value of blittable type as DTO.

Inheritance
object
MemoryManager<byte>
BlittableTransferObject<T>
Implements
IMemoryOwner<byte>
IDisposable
IPinnable
ISerializable<BlittableTransferObject<T>>
IDataTransferObject
IBinaryFormattable<BlittableTransferObject<T>>
Inherited Members
MemoryManager<byte>.CreateMemory(int)
MemoryManager<byte>.CreateMemory(int, int)
MemoryManager<byte>.TryGetArray(out ArraySegment<byte>)
MemoryManager<byte>.Memory
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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 Source

Content

Gets the content of this object.

Declaration
public ref T Content { get; }
Property Value
Type Description
T

Methods

| Edit this page View Source

Dispose(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
MemoryManager<byte>.Dispose(bool)
| Edit this page View Source

GetSpan()

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
MemoryManager<byte>.GetSpan()
| Edit this page View Source

Pin(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
MemoryManager<byte>.Pin(int)
| Edit this page View Source

Unpin()

Unpins pinned memory so that the garbage collector is free to move it.

Declaration
public override sealed void Unpin()
Overrides
MemoryManager<byte>.Unpin()

Implements

IMemoryOwner<T>
IDisposable
IPinnable
ISerializable<TSelf>
IDataTransferObject
IBinaryFormattable<TSelf>

Extension Methods

BasicExtensions.As<T>(T)
BasicExtensions.GetUserData<T>(T)
BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, ReadOnlySpan<T>)
DataTransferObject.ToByteArrayAsync<TObject>(TObject, MemoryAllocator<byte>?, CancellationToken)
DataTransferObject.ToMemoryAsync<TObject>(TObject, MemoryAllocator<byte>?, CancellationToken)
DataTransferObject.ToStringAsync<TObject>(TObject, Encoding, MemoryAllocator<byte>?, CancellationToken)
DataTransferObject.TransformAsync<TResult, TObject>(TObject, Func<IAsyncBinaryReader, CancellationToken, ValueTask<TResult>>, CancellationToken)
DataTransferObject.WriteToAsync<TObject>(TObject, IBufferWriter<byte>, CancellationToken)
DataTransferObject.WriteToAsync<TObject>(TObject, PipeWriter, long, CancellationToken)
DataTransferObject.WriteToAsync<TObject>(TObject, Stream, int, CancellationToken)
DataTransferObject.WriteToAsync<TObject>(TObject, Stream, Memory<byte>, CancellationToken)
ExpressionBuilder.Const<T>(T)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, bool, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, bool, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan, CancellationToken)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾