Table of Contents

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

Guid

CreatedAt

Gets the timestamp when the request was created.

DateTimeOffset CreatedAt { get; }

Property Value

DateTimeOffset

IsCompleted

Gets a value indicating whether the request has completed.

bool IsCompleted { get; }

Property Value

bool

Timeout

Gets the timeout duration.

TimeSpan Timeout { get; }

Property Value

TimeSpan

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

response IResponseMessage

The response message.

Returns

bool

True if the context was completed; false if already completed or type mismatch.