Struct AddToSequenceResult
Encapsulates the result of the AddAsync(IRawInboundEnvelope, ISequence?, bool) method.
Implements
Inherited Members
Namespace: Silverback.Messaging.Sequences
Assembly: Silverback.Integration.dll
Syntax
public readonly struct AddToSequenceResult : IEquatable<AddToSequenceResult>
Constructors
AddToSequenceResult(bool, int, bool, Task?)
Encapsulates the result of the AddAsync(IRawInboundEnvelope, ISequence?, bool) method.
Declaration
public AddToSequenceResult(bool IsSuccess, int PushedStreamsCount = -1, bool IsAborted = false, Task? AbortTask = null)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | IsSuccess | A value indicating whether the operation was successful or not. |
| int | PushedStreamsCount | The number of streams that have been actually pushed. |
| bool | IsAborted | A value indicating whether the sequence was aborted. |
| Task | AbortTask | The Task representing the abort operation. |
Properties
AbortTask
The Task representing the abort operation.
Declaration
public Task? AbortTask { get; init; }
Property Value
| Type | Description |
|---|---|
| Task |
Failed
Gets a static instance representing a failed call to AddAsync(IRawInboundEnvelope, ISequence?, bool).
Declaration
public static AddToSequenceResult Failed { get; }
Property Value
| Type | Description |
|---|---|
| AddToSequenceResult |
IsAborted
A value indicating whether the sequence was aborted.
Declaration
public bool IsAborted { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |
IsSuccess
A value indicating whether the operation was successful or not.
Declaration
public bool IsSuccess { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |
PushedStreamsCount
The number of streams that have been actually pushed.
Declaration
public int PushedStreamsCount { get; init; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
public static AddToSequenceResult Aborted(Task? abortTask)
Parameters
| Type | Name | Description |
|---|---|---|
| Task | abortTask | The Task representing the abort operation. |
Returns
| Type | Description |
|---|---|
| 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.
Declaration
public static AddToSequenceResult AbortedOrFailed(bool isAborted, Task? abortTask)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | isAborted | Indicates whether the sequence was aborted. |
| Task | abortTask | The Task representing the abort operation. |
Returns
| Type | Description |
|---|---|
| AddToSequenceResult | The AddToSequenceResult. |
Deconstruct(out bool, out int, out bool, out Task?)
Encapsulates the result of the AddAsync(IRawInboundEnvelope, ISequence?, bool) method.
Declaration
public void Deconstruct(out bool IsSuccess, out int PushedStreamsCount, out bool IsAborted, out Task? AbortTask)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | IsSuccess | |
| int | PushedStreamsCount | |
| bool | IsAborted | |
| Task | AbortTask |
Equals(AddToSequenceResult)
Encapsulates the result of the AddAsync(IRawInboundEnvelope, ISequence?, bool) method.
Declaration
public bool Equals(AddToSequenceResult other)
Parameters
| Type | Name | Description |
|---|---|---|
| AddToSequenceResult | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object)
Encapsulates the result of the AddAsync(IRawInboundEnvelope, ISequence?, bool) method.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
GetHashCode()
Encapsulates the result of the AddAsync(IRawInboundEnvelope, ISequence?, bool) method.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
Success(int)
Returns a new instance representing a successful call to AddAsync(IRawInboundEnvelope, ISequence?, bool).
Declaration
public static AddToSequenceResult Success(int pushedStreams)
Parameters
| Type | Name | Description |
|---|---|---|
| int | pushedStreams | The number of streams that have been actually pushed. |
Returns
| Type | Description |
|---|---|
| AddToSequenceResult | The AddToSequenceResult. |
ToString()
Encapsulates the result of the AddAsync(IRawInboundEnvelope, ISequence?, bool) method.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
Operators
operator ==(AddToSequenceResult, AddToSequenceResult)
Encapsulates the result of the AddAsync(IRawInboundEnvelope, ISequence?, bool) method.
Declaration
public static bool operator ==(AddToSequenceResult left, AddToSequenceResult right)
Parameters
| Type | Name | Description |
|---|---|---|
| AddToSequenceResult | left | |
| AddToSequenceResult | right |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(AddToSequenceResult, AddToSequenceResult)
Encapsulates the result of the AddAsync(IRawInboundEnvelope, ISequence?, bool) method.
Declaration
public static bool operator !=(AddToSequenceResult left, AddToSequenceResult right)
Parameters
| Type | Name | Description |
|---|---|---|
| AddToSequenceResult | left | |
| AddToSequenceResult | right |
Returns
| Type | Description |
|---|---|
| bool |