Represents data transfer object holding the content of the predefined size in the memory.
InheritanceMemoryTransferObject
Namespace: DotNext.IO Assembly: DotNext.IO.dll Syntaxpublic 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.
Declarationpublic MemoryTransferObject(int length, MemoryAllocator<byte>? allocator = null)
Parameters Type Name Description int length
The length, in bytes, of the content.
MemoryAllocator<byte> allocatorThe memory allocator.
Properties | Edit this page View Source ContentGets the content of this object.
Declarationpublic Memory<byte> Content { get; }
Property Value Methods | Edit this page View Source Dispose(bool)
Releases managed and unmanaged resources associated with this object.
Declarationprotected override void Dispose(bool disposing)
Parameters Overrides | Edit this page View Source TransformAsync<TResult, TTransformation>(TTransformation, CancellationToken)
Converts data transfer object to another type.
Declarationpublic 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 tokenThe token that can be used to cancel the operation.
Returns Type Description ValueTask<TResult>The converted DTO content.
Type Parameters Name Description TResultThe type of result.
TTransformationThe type of parser.
Exceptions | Edit this page View Source WriteToAsync<TWriter>(TWriter, CancellationToken)Transforms this object to serialized form.
Declarationpublic ValueTask WriteToAsync<TWriter>(TWriter writer, CancellationToken token) where TWriter : IAsyncBinaryWriter
Parameters Type Name Description TWriter writer
The binary writer.
CancellationToken tokenThe toke that can be used to cancel the operation.
Returns Type Description ValueTaskThe task representing state of asynchronous execution.
Type Parameters Name Description TWriterThe type of writer.
Exceptions Implements Extension MethodsRetroSearch 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