Table of Contents

Struct AddToSequenceResult

Namespace
Silverback.Messaging.Sequences
Assembly
Silverback.Integration.dll

Encapsulates the result of the AddAsync(IRawInboundEnvelope, ISequence?, bool) method.

public readonly struct AddToSequenceResult : IEquatable<AddToSequenceResult>
Implements
Inherited Members

Constructors

AddToSequenceResult(bool, int, bool, Task?)

Encapsulates the result of the AddAsync(IRawInboundEnvelope, ISequence?, bool) method.

public AddToSequenceResult(bool IsSuccess, int PushedStreamsCount = -1, bool IsAborted = false, Task? AbortTask = null)

Parameters

IsSuccess bool

A value indicating whether the operation was successful or not.

PushedStreamsCount int

The number of streams that have been actually pushed.

IsAborted bool

A value indicating whether the sequence was aborted.

AbortTask Task

The Task representing the abort operation.

Properties

AbortTask

The Task representing the abort operation.

public Task? AbortTask { get; init; }

Property Value

Task

Failed

Gets a static instance representing a failed call to AddAsync(IRawInboundEnvelope, ISequence?, bool).

public static AddToSequenceResult Failed { get; }

Property Value

AddToSequenceResult

IsAborted

A value indicating whether the sequence was aborted.

public bool IsAborted { get; init; }

Property Value

bool

IsSuccess

A value indicating whether the operation was successful or not.

public bool IsSuccess { get; init; }

Property Value

bool

PushedStreamsCount

The number of streams that have been actually pushed.

public int PushedStreamsCount { get; init; }

Property Value

int

Methods

Aborted(Task?)

Returns a new instance representing a failed call to AddAsync(IRawInboundEnvelope, ISequence?, bool) for the specific case of an aborted sequence.

public static AddToSequenceResult Aborted(Task? abortTask)

Parameters

abortTask Task

The Task representing the abort operation.

Returns

AddToSequenceResult

The AddToSequenceResult.

AbortedOrFailed(bool, Task?)

Returns a new instance representing a failed call to AddAsync(IRawInboundEnvelope, ISequence?, bool) for the specific case of an aborted sequence or a failed operation, depending on the specified isAborted parameter.

public static AddToSequenceResult AbortedOrFailed(bool isAborted, Task? abortTask)

Parameters

isAborted bool

Indicates whether the sequence was aborted.

abortTask Task

The Task representing the abort operation.

Returns

AddToSequenceResult

The AddToSequenceResult.

Deconstruct(out bool, out int, out bool, out Task?)

public void Deconstruct(out bool IsSuccess, out int PushedStreamsCount, out bool IsAborted, out Task? AbortTask)

Parameters

IsSuccess bool
PushedStreamsCount int
IsAborted bool
AbortTask Task

Equals(AddToSequenceResult)

public bool Equals(AddToSequenceResult other)

Parameters

other AddToSequenceResult

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Success(int)

Returns a new instance representing a successful call to AddAsync(IRawInboundEnvelope, ISequence?, bool).

public static AddToSequenceResult Success(int pushedStreams)

Parameters

pushedStreams int

The number of streams that have been actually pushed.

Returns

AddToSequenceResult

The AddToSequenceResult.

ToString()

public override string ToString()

Returns

string

Operators

operator ==(AddToSequenceResult, AddToSequenceResult)

public static bool operator ==(AddToSequenceResult left, AddToSequenceResult right)

Parameters

left AddToSequenceResult
right AddToSequenceResult

Returns

bool

operator !=(AddToSequenceResult, AddToSequenceResult)

public static bool operator !=(AddToSequenceResult left, AddToSequenceResult right)

Parameters

left AddToSequenceResult
right AddToSequenceResult

Returns

bool