Search Results for

    Show / Hide Table of Contents

    Struct OutcomeStatusResult<TResult>

    An immutable struct containing a Status (OutcomeStatus) property and a generic Result property. This is typically used (to avoid out parameters) when returning an OutcomeStatus plus one more result from a method. The struct can also be wrapped in a Task when returning from asynchronous methods. This is e.g. used by DeleteRowsAsync(String).

    Note that you must check that Status is Succeeded before using the Result property.

    Also note that the struct can be deconstructed for easy access to the members.

    Implements
    IEquatable<OutcomeStatusResult<TResult>>
    Inherited Members
    ValueType.ToString()
    Namespace: actionETL
    Assembly: actionETL.dll
    Syntax
    public readonly struct OutcomeStatusResult<TResult> : IEquatable<OutcomeStatusResult<TResult>>
    Type Parameters
    Name Description
    TResult

    The type of the Result property.

    Constructors

    OutcomeStatusResult(OutcomeStatus, TResult)

    Initializes a new instance of the immutable OutcomeStatusResult<TResult> struct, containing a Status (OutcomeStatus) property and a generic Result property. This is typically used (to avoid out parameters) when returning an OutcomeStatus plus one more result from a method, with the struct potentially wrapped in a Task for asynchronous methods.

    Declaration
    public OutcomeStatusResult(OutcomeStatus status, TResult result)
    Parameters
    Type Name Description
    OutcomeStatus status

    The resulting status.

    Succeeded on success, in which case result must have a valid value.

    Any failure status on failure (IsFailed is true), in which case result will be ignored.

    TResult result

    The result. Only defined when status is Succeeded.

    Properties

    Result

    Gets the result. Only defined when Status is Succeeded.

    Declaration
    public readonly TResult Result { get; }
    Property Value
    Type Description
    TResult

    Status

    Gets the resulting status.

    Succeeded on success, in which case Result must have a valid value.

    Any failure status on failure (IsFailed is true), in which case Result will be ignored.

    Declaration
    public readonly OutcomeStatus Status { get; }
    Property Value
    Type Description
    OutcomeStatus

    Methods

    Deconstruct(out OutcomeStatus, out TResult)

    Deconstructs the result.

    Declaration
    public readonly void Deconstruct(out OutcomeStatus status, out TResult result)
    Parameters
    Type Name Description
    OutcomeStatus status

    The resulting status.

    Succeeded on success, in which case result must have a valid value.

    Any failure status on failure (IsFailed is true), in which case Result will be ignored.

    TResult result

    The result. Only defined when status is Succeeded.

    Equals(OutcomeStatusResult<TResult>)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public readonly bool Equals(OutcomeStatusResult<TResult> other)
    Parameters
    Type Name Description
    OutcomeStatusResult<TResult> other

    An object to compare with this object.

    Returns
    Type Description
    Boolean

    true if the current object is equal to the other parameter; otherwise, false.

    Equals(Object)

    Determines whether the specified Object is equal to this instance.

    Declaration
    public override readonly bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The Object to compare with this instance.

    Returns
    Type Description
    Boolean

    true if the specified Object is equal to this instance; otherwise, false.

    Overrides
    ValueType.Equals(Object)

    GetHashCode()

    Returns a hash code for this instance.

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

    Overrides
    ValueType.GetHashCode()

    Operators

    Equality(OutcomeStatusResult<TResult>, OutcomeStatusResult<TResult>)

    Implements the operator ==.

    Declaration
    public static bool operator ==(OutcomeStatusResult<TResult> left, OutcomeStatusResult<TResult> right)
    Parameters
    Type Name Description
    OutcomeStatusResult<TResult> left

    The left.

    OutcomeStatusResult<TResult> right

    The right.

    Returns
    Type Description
    Boolean

    The result of the operator.

    Inequality(OutcomeStatusResult<TResult>, OutcomeStatusResult<TResult>)

    Implements the operator !=.

    Declaration
    public static bool operator !=(OutcomeStatusResult<TResult> left, OutcomeStatusResult<TResult> right)
    Parameters
    Type Name Description
    OutcomeStatusResult<TResult> left

    The left.

    OutcomeStatusResult<TResult> right

    The right.

    Returns
    Type Description
    Boolean

    The result of the operator.

    Implements

    System.IEquatable<T>
    In This Article
    Back to top Copyright © 2023 Envobi Ltd