Show / Hide Table of Contents

    Class DelegateUtilityExtensions

    This is an extension implementation of the most common methods on the DelegateUtility class.

    Inheritance
    System.Object
    DelegateUtilityExtensions
    Namespace: Cuemon
    Assembly: Cuemon.Core.dll
    Syntax
    public static class DelegateUtilityExtensions

    Methods

    | Improve this Doc

    ConfigureOptions<TOptions>(Action<TOptions>)

    Provides a generic way to support the options pattern which enables using custom options classes to represent a group of related settings.

    Declaration
    public static TOptions ConfigureOptions<TOptions>(this Action<TOptions> setup)
    Parameters
    Type Name Description
    System.Action<TOptions> setup

    The delegate that will configure the public read-write properties of TOptions.

    Returns
    Type Description
    TOptions

    A default constructed instance of TOptions initialized with the options of setup.

    Type Parameters
    Name Description
    TOptions

    The type of the custom options class.

    | Improve this Doc

    DynamicWrap<TResult>(TResult)

    Provides a way to dynamically wrap a return value (typically from a property or field) inside an anonymous method.

    Declaration
    public static Func<TResult> DynamicWrap<TResult>(this TResult output)
    Parameters
    Type Name Description
    TResult output

    The value to dynamically wrap as a return value (typically from a property of field) inside an anonymous method.

    Returns
    Type Description
    System.Func<TResult>

    An anonymous method that returns the value of output.

    Type Parameters
    Name Description
    TResult

    The type of the return value of output.

    | Improve this Doc

    Wrap<TResult>(TResult)

    Provides an easy and reflection less way to get a value from a property that is delegate compatible (such as System.Func<TResult> and the likes thereof).

    Declaration
    public static TResult Wrap<TResult>(this TResult output)
    Parameters
    Type Name Description
    TResult output

    The return value of a member to be routed as output through this Wrap{TResult} method.

    Returns
    Type Description
    TResult

    The value from output.

    Type Parameters
    Name Description
    TResult

    The type of the return value of output.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX