Search Results for

    Show / Hide Table of Contents

    Struct ProgressStatusResult<TResult>

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

    Note that you must ensure Status is NotCompleted or Succeeded (IsFailed is false) before using the Result property.

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

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

    The type of the Result property.

    Constructors

    ProgressStatusResult(ProgressStatus, TResult)

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

    Declaration
    public ProgressStatusResult(ProgressStatus status, TResult result)
    Parameters
    Type Name Description
    ProgressStatus status

    The resulting status.

    NotCompleted if the operation should continue and Succeeded on successful completion. In both cases result must have a valid value.

    Any failure status on failure (IsFailed is true), in which case the operation should stop and result will be ignored.

    TResult result

    The result. Only defined when Status is NotCompleted or Succeeded.

    Properties

    Result

    Gets the result. Only defined when Status is NotCompleted or Succeeded (IsFailed is false).

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

    Status

    Gets the resulting status.

    NotCompleted if the operation should continue and Succeeded on successful completion. In both cases Result must have a valid value.

    Any failure status on failure (IsFailed is true), in which case the operation should stop and Result will be undefined.

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

    Methods

    Deconstruct(out ProgressStatus, out TResult)

    Deconstructs the result.

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

    The resulting status.

    NotCompleted if the operation should continue and Succeeded on successful completion. In both cases result must have a valid value.

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

    TResult result

    The result. Only defined when status is NotCompleted or Succeeded.

    Equals(ProgressStatusResult<TResult>)

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

    Declaration
    public readonly bool Equals(ProgressStatusResult<TResult> other)
    Parameters
    Type Name Description
    ProgressStatusResult<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(ProgressStatusResult<TResult>, ProgressStatusResult<TResult>)

    Implements the operator ==.

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

    The left.

    ProgressStatusResult<TResult> right

    The right.

    Returns
    Type Description
    Boolean

    The result of the operator.

    Inequality(ProgressStatusResult<TResult>, ProgressStatusResult<TResult>)

    Implements the operator !=.

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

    The left.

    ProgressStatusResult<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