Class PipelinePublishResult
- Namespace
- Pipelinez.Core.FlowControl
- Assembly
- Pipelinez.dll
Represents the result of attempting to publish a record into the pipeline.
public sealed class PipelinePublishResult
- Inheritance
-
PipelinePublishResult
- Inherited Members
Properties
Accepted
Gets a value indicating whether the record was accepted by the pipeline.
public bool Accepted { get; }
Property Value
Reason
Gets the reason associated with the publish outcome.
public PipelinePublishResultReason Reason { get; }
Property Value
WaitDuration
Gets the amount of time spent waiting for capacity before the outcome was produced.
public TimeSpan WaitDuration { get; }
Property Value
Methods
AcceptedResult(TimeSpan)
Creates a successful publish result.
public static PipelinePublishResult AcceptedResult(TimeSpan waitDuration)
Parameters
waitDurationTimeSpanThe time spent waiting for capacity.
Returns
- PipelinePublishResult
A successful publish result.
Rejected(PipelinePublishResultReason, TimeSpan)
Creates a rejected publish result.
public static PipelinePublishResult Rejected(PipelinePublishResultReason reason, TimeSpan waitDuration)
Parameters
reasonPipelinePublishResultReasonThe rejection reason.
waitDurationTimeSpanThe time spent waiting before rejection.
Returns
- PipelinePublishResult
A rejected publish result.
ThrowIfNotAccepted()
Throws an exception when the publish attempt was not accepted.
public void ThrowIfNotAccepted()