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.IDataTransferObject.html below:

Interface IDataTransferObject | .NEXT

Interface IDataTransferObject

Represents the structured data unit that can be transferred over wire.

Namespace: DotNext.IO Assembly: DotNext.IO.dll Syntax
public interface IDataTransferObject
Properties | Edit this page View Source Empty

Gets empty data transfer object.

Declaration
public static IDataTransferObject Empty { get; }
Property Value | Edit this page View Source IsReusable

Indicates that the content of this object can be copied to the output stream or pipe multiple times.

Declaration Property Value | Edit this page View Source Length

Gets length of the object payload, in bytes.

Declaration Property Value Methods | Edit this page View Source TransformAsync<TResult, TTransformation>(PipeReader, TTransformation, CancellationToken)

Decodes the data using pipe reader.

Declaration
protected static ValueTask<TResult> TransformAsync<TResult, TTransformation>(PipeReader input, TTransformation transformation, CancellationToken token) where TTransformation : IDataTransferObject.ITransformation<TResult>
Parameters Type Name Description PipeReader input

The pipe reader used for decoding.

TTransformation transformation

The decoder.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask<TResult>

The decoded stream.

Type Parameters Name Description TResult

The type of result.

TTransformation

The type of parser.

Exceptions | Edit this page View Source TransformAsync<TResult, TTransformation>(Stream, TTransformation, bool, MemoryAllocator<byte>?, CancellationToken)

Decodes the stream.

Declaration
protected static ValueTask<TResult> TransformAsync<TResult, TTransformation>(Stream input, TTransformation transformation, bool resetStream, MemoryAllocator<byte>? allocator, CancellationToken token) where TTransformation : IDataTransferObject.ITransformation<TResult>
Parameters Type Name Description Stream input

The stream to decode.

TTransformation transformation

The decoder.

bool resetStream

true to reset stream position after decoding.

MemoryAllocator<byte> allocator

The allocator of temporary buffer.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask<TResult>

The decoded stream.

Type Parameters Name Description TResult

The type of result.

TTransformation

The type of parser.

Exceptions | Edit this page View Source TransformAsync<TResult, TTransformation>(Stream, TTransformation, bool, Memory<byte>, CancellationToken)

Decodes the stream.

Declaration
protected static ValueTask<TResult> TransformAsync<TResult, TTransformation>(Stream input, TTransformation transformation, bool resetStream, Memory<byte> buffer, CancellationToken token) where TTransformation : IDataTransferObject.ITransformation<TResult>
Parameters Type Name Description Stream input

The stream to decode.

TTransformation transformation

The decoder.

bool resetStream

true to reset stream position after decoding.

Memory<byte> buffer

The temporary buffer.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask<TResult>

The decoded stream.

Type Parameters Name Description TResult

The type of result.

TTransformation

The type of parser.

Exceptions | Edit this page View Source TransformAsync<TResult, TTransformation>(Stream, TTransformation, bool, CancellationToken)

Decodes the stream.

Declaration
protected static ValueTask<TResult> TransformAsync<TResult, TTransformation>(Stream input, TTransformation transformation, bool resetStream, CancellationToken token) where TTransformation : IDataTransferObject.ITransformation<TResult>
Parameters Type Name Description Stream input

The stream to decode.

TTransformation transformation

The decoder.

bool resetStream

true to reset stream position after decoding.

CancellationToken token

The token that can be used to cancel the operation.

Returns Type Description ValueTask<TResult>

The decoded stream.

Type Parameters Name Description TResult

The type of result.

TTransformation

The type of parser.

Exceptions | Edit this page View Source TransformAsync<TResult, TTransformation>(TTransformation, CancellationToken)

Converts the data transfer object to another type.

Declaration
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 TryGetMemory(out ReadOnlyMemory<byte>)

Attempts to retrieve the contents of this object as a memory block synchronously.

Declaration
bool TryGetMemory(out ReadOnlyMemory<byte> memory)
Parameters Type Name Description ReadOnlyMemory<byte> memory

The memory block containing the contents of this object.

Returns Type Description bool

true if this object is representable as a memory block; otherwise, false.

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

Transforms this object to serialized form.

Declaration
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 Extension Methods See Also

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