Search Results for

    Show / Hide Table of Contents

    Class OutcomeStatusResult

    A factory class that provides static methods for creating OutcomeStatusResult<TResult> immutable struct values, which are typically used (to avoid out parameters) when returning an OutcomeStatus plus one more result from a method.

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

    Inheritance
    Object
    OutcomeStatusResult
    Namespace: actionETL
    Assembly: actionETL.dll
    Syntax
    public static class OutcomeStatusResult

    Methods

    Create<TResult>(OutcomeStatus, TResult)

    A factory that creates a new instance of the immutable OutcomeStatusResult<TResult> struct, which 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.

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

    Declaration
    public static OutcomeStatusResult<TResult> Create<TResult>(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.

    Returns
    Type Description
    OutcomeStatusResult<TResult>

    The immutable struct. Note that it can be deconstructed for easy access to the members.

    Type Parameters
    Name Description
    TResult

    The type of the result parameter.

    Succeeded<TResult>(TResult)

    A factory that creates a new instance of the immutable OutcomeStatusResult<TResult> struct, with Status set to Succeeded.

    This class 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 static OutcomeStatusResult<TResult> Succeeded<TResult>(TResult result)
    Parameters
    Type Name Description
    TResult result

    The result.

    Returns
    Type Description
    OutcomeStatusResult<TResult>

    The immutable struct. Note that it can be deconstructed for easy access to the members.

    Type Parameters
    Name Description
    TResult

    The type of the result parameter.

    In This Article
    Back to top Copyright © 2023 Envobi Ltd