Class CorrelationIdResolver

Namespace
Cratis.Arc.Execution
Assembly
Cratis.Arc.Core.dll

Resolves and parses correlation IDs from transport values and the current execution context.

public static class CorrelationIdResolver
Inheritance
CorrelationIdResolver
Inherited Members

Methods

ResolveOrCreate(object?, ICorrelationIdAccessor)

Resolves a CorrelationId from a transport value or from the current execution context.

public static CorrelationId ResolveOrCreate(object? value, ICorrelationIdAccessor correlationIdAccessor)

Parameters

value object

The value that might represent a correlation ID.

correlationIdAccessor ICorrelationIdAccessor

The accessor for the current correlation ID.

Returns

CorrelationId

The resolved CorrelationId.

TryGet(object?, out CorrelationId)

Tries to create a CorrelationId from the provided value.

public static bool TryGet(object? value, out CorrelationId correlationId)

Parameters

value object

The value that might represent a correlation ID.

correlationId CorrelationId

The parsed CorrelationId when successful.

Returns

bool

true if the value could be converted to a CorrelationId; otherwise false.