A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://dotnet.github.io/dotNext/api/DotNext.IO.MemoryTransferObject.html below:

Class MemoryTransferObject | .NEXT

Class MemoryTransferObject

Represents data transfer object holding the content of the predefined size in the memory.

Inheritance

MemoryTransferObject

Namespace: DotNext.IO Assembly: DotNext.IO.dll Syntax
public class MemoryTransferObject : Disposable, IDisposable, IDataTransferObject
Constructors | Edit this page View Source MemoryTransferObject(int, MemoryAllocator<byte>?)

Represents data transfer object holding the content of the predefined size in the memory.

Declaration
public MemoryTransferObject(int length, MemoryAllocator<byte>? allocator = null)
Parameters Type Name Description int length

The length, in bytes, of the content.

MemoryAllocator<byte> allocator

The memory allocator.

Properties | Edit this page View Source Content

Gets the content of this object.

Declaration
public Memory<byte> Content { get; }
Property Value Methods | Edit this page View Source Dispose(bool)

Releases managed and unmanaged resources associated with this object.

Declaration
protected override void Dispose(bool disposing)
Parameters Overrides | Edit this page View Source TransformAsync<TResult, TTransformation>(TTransformation, CancellationToken)

Converts data transfer object to another type.

Declaration
public ValueTask<TResult> TransformAsync<TResult, TTransformation>(TTransformation transformation, CancellationToken token = default) where TTransformation : IDataTransferObject.ITransformation<TResult>
Parameters Type Name Description TTransformation transformation

The parser instance.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask<TResult>

The converted DTO content.

Type Parameters Name Description TResult

The type of result.

TTransformation

The type of parser.

Exceptions | Edit this page View Source WriteToAsync<TWriter>(TWriter, CancellationToken)

Transforms this object to serialized form.

Declaration
public ValueTask WriteToAsync<TWriter>(TWriter writer, CancellationToken token) where TWriter : IAsyncBinaryWriter
Parameters Type Name Description TWriter writer

The binary writer.

CancellationToken token

The toke that can be used to cancel the operation.

Returns Type Description ValueTask

The task representing state of asynchronous execution.

Type Parameters Name Description TWriter

The type of writer.

Exceptions Implements Extension Methods

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4