Class OperationContext
Base class for contexts provided on different operation calls.
public abstract record OperationContext : IEquatable<OperationContext>
- Inheritance
-
OperationContext
- Implements
- Derived
- Inherited Members
Constructors
OperationContext(string, string, CancellationToken)
Base class for contexts provided on different operation calls.
protected OperationContext(string Service, string Operation, CancellationToken CancellationToken)
Parameters
ServicestringService name.
OperationstringOperation name.
CancellationTokenCancellationTokenCancellation token for when this specific call is canceled (not to be confused with operation cancellation).
Properties
CancellationReason
Gets or sets the cancellation reason if cancellation token is canceled.
public string? CancellationReason { get; set; }
Property Value
Remarks
This is the reason the specific operation call and cancellation token are canceled and is not related to actual operation cancellation.
CancellationToken
Cancellation token for when this specific call is canceled (not to be confused with operation cancellation).
public CancellationToken CancellationToken { get; init; }
Property Value
Headers
Gets the set of headers for this call.
public IReadOnlyDictionary<string, string>? Headers { get; init; }
Property Value
Remarks
This dictionary is expected to compare keys case-insensitively.
Operation
Operation name.
public string Operation { get; init; }
Property Value
OutboundLinks
Gets outbound links to set on response. This is intentionally mutable as handlers and middleware are welcome to add links.
public IList<NexusLink> OutboundLinks { get; init; }
Property Value
Service
Service name.
public string Service { get; init; }