Share via


MessageFormatterEnumerableTracker Class

Definition

A helper class that IJsonRpcMessageFormatter implementations may use to support IAsyncEnumerable<T> return values from RPC methods.

public class MessageFormatterEnumerableTracker
type MessageFormatterEnumerableTracker = class
Public Class MessageFormatterEnumerableTracker
Inheritance
MessageFormatterEnumerableTracker

Constructors

MessageFormatterEnumerableTracker(JsonRpc, IJsonRpcFormatterState)

Initializes a new instance of the MessageFormatterEnumerableTracker class.

Fields

TokenPropertyName

The name of the string property that carries the handle for the enumerable.

ValuesPropertyName

The name of the JSON array property that contains the values.

Methods

CanDeserialize(Type)

Checks if a given Type is exactly some closed generic type based on IAsyncEnumerable<T>.

CanSerialize(Type)

Checks if a given Type implements IAsyncEnumerable<T>.

CreateEnumerableProxy<T>(Object, IReadOnlyList<T>)

Used by the consumer to construct a proxy that implements IAsyncEnumerable<T> and gets all its values from a remote generator.

GetToken<T>(IAsyncEnumerable<T>)

Used by the generator to assign a handle to the given IAsyncEnumerable<T>.

Applies to