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
IsSuccessboolA value indicating whether the operation was successful or not.
PushedStreamsCountintThe number of streams that have been actually pushed.
IsAbortedboolA value indicating whether the sequence was aborted.
AbortTaskTaskThe Task representing the abort operation.
Properties
AbortTask
The Task representing the abort operation.
public Task? AbortTask { get; init; }
Property Value
Failed
Gets a static instance representing a failed call to AddAsync(IRawInboundEnvelope, ISequence?, bool).
public static AddToSequenceResult Failed { get; }
Property Value
IsAborted
A value indicating whether the sequence was aborted.
public bool IsAborted { get; init; }
Property Value
IsSuccess
A value indicating whether the operation was successful or not.
public bool IsSuccess { get; init; }
Property Value
PushedStreamsCount
The number of streams that have been actually pushed.
public int PushedStreamsCount { get; init; }
Property Value
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
Returns
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
isAbortedboolIndicates whether the sequence was aborted.
abortTaskTaskThe Task representing the abort operation.
Returns
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
Equals(AddToSequenceResult)
public bool Equals(AddToSequenceResult other)
Parameters
otherAddToSequenceResult
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
Success(int)
Returns a new instance representing a successful call to AddAsync(IRawInboundEnvelope, ISequence?, bool).
public static AddToSequenceResult Success(int pushedStreams)
Parameters
pushedStreamsintThe number of streams that have been actually pushed.
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(AddToSequenceResult, AddToSequenceResult)
public static bool operator ==(AddToSequenceResult left, AddToSequenceResult right)
Parameters
leftAddToSequenceResultrightAddToSequenceResult
Returns
operator !=(AddToSequenceResult, AddToSequenceResult)
public static bool operator !=(AddToSequenceResult left, AddToSequenceResult right)
Parameters
leftAddToSequenceResultrightAddToSequenceResult