Table of Contents

Class TimeoutContext

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

Provides additional context for timeout decisions and adaptive timeout calculations. Context-aware timeout handling.

public sealed class TimeoutContext
Inheritance
TimeoutContext
Inherited Members
Extension Methods

Properties

Complexity

Gets or sets the complexity level of the operation, affecting timeout calculations.

public OperationComplexity Complexity { get; set; }

Property Value

OperationComplexity

The assessed complexity for the current operation.

ExpectedMessageSizeBytes

Gets or sets the expected message size, which may influence timeout calculations.

public long? ExpectedMessageSizeBytes { get; set; }

Property Value

long?

The anticipated message payload size in bytes.

HandlerType

Gets or sets the handler type for handler-specific timeout overrides.

public Type? HandlerType { get; set; }

Property Value

Type

The handler type for the execution context.

IsRetry

Gets or sets a value indicating whether this is a retry operation, which may affect timeout behavior.

public bool IsRetry { get; set; }

Property Value

bool

true when the context represents a retry attempt; otherwise, false.

MessageType

Gets or sets the message type for message-specific timeout overrides.

public Type? MessageType { get; set; }

Property Value

Type

The message type associated with the operation.

Properties

Gets additional properties for custom timeout logic.

public IDictionary<string, object> Properties { get; init; }

Property Value

IDictionary<string, object>

A dictionary of customizable timeout properties.

RetryCount

Gets or sets the number of retries attempted, for progressive timeout strategies.

public int RetryCount { get; set; }

Property Value

int

The number of retry attempts already performed.

Tags

Gets additional tags for categorizing the operation.

public ISet<string> Tags { get; init; }

Property Value

ISet<string>

A set of tags describing the operation.

Methods

ForHandler(Type)

Creates a new timeout context with the specified handler type.

public static TimeoutContext ForHandler(Type handlerType)

Parameters

handlerType Type

The handler type.

Returns

TimeoutContext

A new timeout context.

ForMessage(Type)

Creates a new timeout context with the specified message type.

public static TimeoutContext ForMessage(Type messageType)

Parameters

messageType Type

The message type.

Returns

TimeoutContext

A new timeout context.

ForRetry(int)

Creates a new timeout context for a retry operation.

public static TimeoutContext ForRetry(int retryCount)

Parameters

retryCount int

The number of retries attempted.

Returns

TimeoutContext

A new timeout context.

WithComplexity(OperationComplexity)

Creates a new timeout context with the specified complexity.

public static TimeoutContext WithComplexity(OperationComplexity complexity)

Parameters

complexity OperationComplexity

The operation complexity.

Returns

TimeoutContext

A new timeout context.