Table of Contents

Class PipelineRetryContext<T>

Namespace
Pipelinez.Core.Retry
Assembly
Pipelinez.dll

Provides context for retry policy evaluation.

public sealed class PipelineRetryContext<T> where T : PipelineRecord

Type Parameters

T

The pipeline record type being retried.

Inheritance
PipelineRetryContext<T>
Inherited Members

Constructors

PipelineRetryContext(Exception, PipelineContainer<T>, string, PipelineComponentKind, int, int, CancellationToken)

Initializes a new retry context.

public PipelineRetryContext(Exception exception, PipelineContainer<T> container, string componentName, PipelineComponentKind componentKind, int attemptNumber, int maxAttempts, CancellationToken cancellationToken)

Parameters

exception Exception
container PipelineContainer<T>
componentName string
componentKind PipelineComponentKind
attemptNumber int
maxAttempts int
cancellationToken CancellationToken

Properties

AttemptNumber

Gets the current attempt number, starting at one.

public int AttemptNumber { get; }

Property Value

int

CancellationToken

Gets the cancellation token associated with the retry operation.

public CancellationToken CancellationToken { get; }

Property Value

CancellationToken

ComponentKind

Gets the component kind associated with the retry.

public PipelineComponentKind ComponentKind { get; }

Property Value

PipelineComponentKind

ComponentName

Gets the component name associated with the retry.

public string ComponentName { get; }

Property Value

string

Container

Gets the pipeline container being retried.

public PipelineContainer<T> Container { get; }

Property Value

PipelineContainer<T>

Exception

Gets the exception that triggered the retry evaluation.

public Exception Exception { get; }

Property Value

Exception

MaxAttempts

Gets the maximum number of attempts allowed by the retry policy.

public int MaxAttempts { get; }

Property Value

int

Record

Gets the record being retried.

public T Record { get; }

Property Value

T