Table of Contents

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

bool

Reason

Gets the reason associated with the publish outcome.

public PipelinePublishResultReason Reason { get; }

Property Value

PipelinePublishResultReason

WaitDuration

Gets the amount of time spent waiting for capacity before the outcome was produced.

public TimeSpan WaitDuration { get; }

Property Value

TimeSpan

Methods

AcceptedResult(TimeSpan)

Creates a successful publish result.

public static PipelinePublishResult AcceptedResult(TimeSpan waitDuration)

Parameters

waitDuration TimeSpan

The 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

reason PipelinePublishResultReason

The rejection reason.

waitDuration TimeSpan

The 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()