EveMessageResponse
NexusLabs.Eve¶
EveMessageResponse Class¶
Exposes accepted turn metadata and its single-use event stream.
public sealed class EveMessageResponse : System.Collections.Generic.IAsyncEnumerable<NexusLabs.Eve.EveStreamEvent>
Inheritance System.Object → EveMessageResponse
Implements System.Collections.Generic.IAsyncEnumerable<EveStreamEvent>
Properties¶
EveMessageResponse.SessionId Property¶
Gets the runtime-owned session identifier.
Property Value¶
Methods¶
EveMessageResponse.CancelAsync(CancellationToken) Method¶
Requests cooperative cancellation of the exact turn represented by this response.
public System.Threading.Tasks.Task<NexusLabs.Eve.EveCancellationOutcome> CancelAsync(System.Threading.CancellationToken cancellationToken);
Parameters¶
cancellationToken System.Threading.CancellationToken
Cancels the queued or active cancellation request.
Returns¶
System.Threading.Tasks.Task<EveCancellationOutcome>
The successful cancellation disposition.
Exceptions¶
System.OperationCanceledException
The cancellation token was cancelled before the request completed.
EveClientException
The server returned a non-successful status.
EveProtocolException
The turn-start event or cancellation response did not match the eve protocol.
Remarks¶
Start consuming this response before awaiting cancellation. The request waits for the stream to identify its turn, then sends that identifier as a guard and remains attached through the durable turn boundary. Concurrent calls share one in-flight request. The first call's token controls that request; later tokens can cancel only their caller's wait.
EveMessageResponse.GetAsyncEnumerator(CancellationToken) Method¶
Gets the single-use event-stream enumerator.
public System.Collections.Generic.IAsyncEnumerator<NexusLabs.Eve.EveStreamEvent> GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken);
Parameters¶
cancellationToken System.Threading.CancellationToken
Stops local stream consumption.
Implements GetAsyncEnumerator(CancellationToken)
Returns¶
System.Collections.Generic.IAsyncEnumerator<EveStreamEvent>
The event-stream enumerator.
Exceptions¶
System.InvalidOperationException
The response was already consumed.
EveMessageResponse.GetOutcomeAsync(CancellationToken) Method¶
Consumes the event stream and aggregates its terminal values.
public System.Threading.Tasks.Task<NexusLabs.Eve.EveTurnOutcome> GetOutcomeAsync(System.Threading.CancellationToken cancellationToken);
Parameters¶
cancellationToken System.Threading.CancellationToken
Stops local stream consumption.
Returns¶
System.Threading.Tasks.Task<EveTurnOutcome>
The aggregated turn outcome.