Interface ICorrelationContextBase
- Namespace
- DotCompute.Abstractions.Messaging
- Assembly
- DotCompute.Abstractions.dll
Non-generic base interface for correlation contexts. Used internally to avoid reflection in Native AOT scenarios.
public interface ICorrelationContextBase : IDisposable
- Inherited Members
- Extension Methods
Properties
CorrelationId
Gets the correlation ID for this request.
Guid CorrelationId { get; }
Property Value
CreatedAt
Gets the timestamp when the request was created.
DateTimeOffset CreatedAt { get; }
Property Value
IsCompleted
Gets a value indicating whether the request has completed.
bool IsCompleted { get; }
Property Value
Timeout
Gets the timeout duration.
TimeSpan Timeout { get; }
Property Value
Methods
TrySetCanceled()
Cancels the pending request.
bool TrySetCanceled()
Returns
- bool
True if the context was cancelled; false if already completed.
TrySetResultUntyped(IResponseMessage)
Attempts to complete the context with a response message.
bool TrySetResultUntyped(IResponseMessage response)
Parameters
responseIResponseMessageThe response message.
Returns
- bool
True if the context was completed; false if already completed or type mismatch.