Class PipelineContainer<T>
Wraps a pipeline record with metadata, fault state, and execution history while it moves through the pipeline.
public sealed class PipelineContainer<T> where T : PipelineRecord
Type Parameters
TThe pipeline record type carried by the container.
- Inheritance
-
PipelineContainer<T>
- Inherited Members
Constructors
PipelineContainer(T)
Initializes a new container for the supplied record with an empty metadata collection.
public PipelineContainer(T record)
Parameters
recordTThe record to wrap.
PipelineContainer(T, MetadataCollection)
Initializes a new container for the supplied record and metadata.
public PipelineContainer(T record, MetadataCollection metadata)
Parameters
recordTThe record to wrap.
metadataMetadataCollectionThe metadata associated with the record.
Properties
CreatedAtUtc
Gets the time the container was created.
public DateTimeOffset CreatedAtUtc { get; }
Property Value
Fault
Gets the fault state recorded for the container, if any.
public PipelineFaultState? Fault { get; }
Property Value
HasFault
Gets a value indicating whether the container has faulted.
public bool HasFault { get; }
Property Value
Metadata
Gets the metadata associated with the record.
public MetadataCollection Metadata { get; }
Property Value
Record
Gets or sets the record carried by the container.
public T Record { get; set; }
Property Value
- T
RetryHistory
Gets the ordered retry history recorded for the container.
public IList<PipelineRetryAttempt> RetryHistory { get; }
Property Value
SegmentHistory
Gets the ordered execution history recorded for pipeline segments.
public IList<PipelineSegmentExecution> SegmentHistory { get; }
Property Value
Methods
AddRetryAttempt(PipelineRetryAttempt)
Adds a retry attempt entry to the container history.
public void AddRetryAttempt(PipelineRetryAttempt retryAttempt)
Parameters
retryAttemptPipelineRetryAttemptThe retry attempt to add.
AddSegmentExecution(PipelineSegmentExecution)
Adds a segment execution entry to the container history.
public void AddSegmentExecution(PipelineSegmentExecution segmentExecution)
Parameters
segmentExecutionPipelineSegmentExecutionThe execution record to add.
MarkFaulted(PipelineFaultState)
Marks the container as faulted.
public void MarkFaulted(PipelineFaultState fault)
Parameters
faultPipelineFaultStateThe fault state to record.