Condividi tramite


MessageFormatterEnumerableTracker Classe

Definizione

Classe helper che IJsonRpcMessageFormatter le implementazioni possono usare per supportare IAsyncEnumerable<T> i valori restituiti dai metodi RPC.

public class MessageFormatterEnumerableTracker
type MessageFormatterEnumerableTracker = class
Public Class MessageFormatterEnumerableTracker
Ereditarietà
MessageFormatterEnumerableTracker

Costruttori

MessageFormatterEnumerableTracker(JsonRpc, IJsonRpcFormatterState)

Inizializza una nuova istanza della classe MessageFormatterEnumerableTracker.

Campi

TokenPropertyName

Nome della proprietà stringa che contiene l'handle per l'enumerabile.

ValuesPropertyName

Nome della proprietà matrice JSON che contiene i valori.

Metodi

CanDeserialize(Type)

Verifica se un determinato Type tipo generico è esattamente un tipo generico chiuso basato su IAsyncEnumerable<T>.

CanSerialize(Type)

Verifica se un determinato Type oggetto implementa IAsyncEnumerable<T>.

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

Usato dal consumer per costruire un proxy che implementa IAsyncEnumerable<T> e ottiene tutti i relativi valori da un generatore remoto.

GetToken<T>(IAsyncEnumerable<T>)

Usato dal generatore per assegnare un handle all'oggetto specificato IAsyncEnumerable<T>.

Si applica a