Search Results for

    Show / Hide Table of Contents

    Class Chain<T>

    Defines an implementation for a chain of objects.

    Inheritance
    System.Object
    Chain<T>
    Implements
    IChain<T>
    Namespace: MADE.Runtime.Actions
    Assembly: MADE.Runtime.dll
    Syntax
    public class Chain<T> : object, IChain<T> where T : class
    Type Parameters
    Name Description
    T

    The type of object being chained.

    Constructors

    | Improve this Doc View Source

    Chain(T)

    Initializes a new instance of the Chain<T> class with an instance.

    Declaration
    public Chain(T instance)
    Parameters
    Type Name Description
    T instance

    The instance to begin the chain.

    | Improve this Doc View Source

    Chain(IEnumerable<T>)

    Initializes a new instance of the Chain<T> class with a collection of instances.

    Declaration
    public Chain(IEnumerable<T> instances)
    Parameters
    Type Name Description
    IEnumerable<T> instances

    The instances to begin the chain.

    Methods

    | Improve this Doc View Source

    Invoke(Action<T>)

    Invokes an action with the chain.

    Declaration
    public void Invoke(Action<T> func)
    Parameters
    Type Name Description
    Action<T> func

    The action to invoke.

    | Improve this Doc View Source

    InvokeAsync(Func<T, Task>)

    Invokes an asynchronous action with the chain.

    Declaration
    public async Task InvokeAsync(Func<T, Task> func)
    Parameters
    Type Name Description
    Func<T, Task> func

    The asynchronous action to invoke.

    Returns
    Type Description
    Task

    An asynchronous operation.

    | Improve this Doc View Source

    With(T)

    Concatenates the current instances in the chain with the specified instance.

    Declaration
    public Chain<T> With(T instance)
    Parameters
    Type Name Description
    T instance

    The instance to chain.

    Returns
    Type Description
    Chain<T>

    The updated Chain<T>.

    | Improve this Doc View Source

    With(IEnumerable<T>)

    Concatenates the current instances in the chain with the specified instances.

    Declaration
    public Chain<T> With(IEnumerable<T> instances)
    Parameters
    Type Name Description
    IEnumerable<T> instances

    The instances to chain.

    Returns
    Type Description
    Chain<T>

    The updated Chain<T>.

    Implements

    IChain<T>

    Extension Methods

    ReflectionExtensions.GetPropertyValue<T>(Object, String)
    ReflectionExtensions.GetPropertyNames(Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright (c) MADE Apps