Table of Contents

Class ReadRequest

Namespace
Nexus.Extensibility
Assembly
Nexus.Extensibility.dll

A read request.

public sealed class ReadRequest
Inheritance
ReadRequest
Inherited Members

Remarks

This type carries runtime buffers and completion callbacks and is not a serialization contract. Use a separate DTO at process or wire boundaries.

Constructors

ReadRequest(string, CatalogItem, Memory<byte>, Memory<byte>, Func<CancellationToken, Task>, CancellationToken)

Initializes a read request.

public ReadRequest(string originalResourceName, CatalogItem catalogItem, Memory<byte> data, Memory<byte> status, Func<CancellationToken, Task> onCompleted, CancellationToken cancellationToken)

Parameters

originalResourceName string

The original resource name.

catalogItem CatalogItem

The catalog item to be read.

data Memory<byte>

The data buffer.

status Memory<byte>

The status buffer. A value of 0x01 ('1') indicates that the corresponding value in the data buffer is valid, otherwise it is treated as NaN or NaN, respectively.

onCompleted Func<CancellationToken, Task>

The host callback to run once when the request is completed.

cancellationToken CancellationToken

The host-owned cancellation token for completion.

Properties

CatalogItem

The catalog item to be read.

public CatalogItem CatalogItem { get; }

Property Value

CatalogItem

Data

The data buffer.

public Memory<byte> Data { get; }

Property Value

Memory<byte>

OriginalResourceName

The original resource name.

public string OriginalResourceName { get; }

Property Value

string

Status

The status buffer. A value of 0x01 ('1') indicates that the corresponding value in the data buffer is valid, otherwise it is treated as NaN.

public Memory<byte> Status { get; }

Property Value

Memory<byte>

Methods

CompleteAsync()

Called by the data source when Data and Status are fully populated. The framework flushes the resource to its pipe immediately.

public Task CompleteAsync()

Returns

Task