Show / Hide Table of Contents

    Class LambdaCommandData

    Wraps a dynamic delegate such as Action and Func so that a lambda can be used as a command.

    Inheritance
    Object
    CommandData
    LambdaCommandData
    Inherited Members
    CommandData.CommandName
    CommandData.CommandDescription
    CommandData.CommandSignature
    CommandData.ParameterSignature
    CommandData.GenericSignature
    CommandData.MethodParamData
    CommandData.ParamTypes
    CommandData.GenericParamTypes
    CommandData.MethodData
    CommandData.MonoTarget
    CommandData.HasParamsArgument
    CommandData.IsGeneric
    CommandData.IsStatic
    CommandData.HasDescription
    CommandData.ParamCount
    CommandData.MakeGenericArguments(Type[])
    CommandData.Invoke(Object[], Type[])
    Namespace: QFSW.QC
    Assembly: QFSW.QC.dll
    Syntax
    public class LambdaCommandData : CommandData

    Constructors

    LambdaCommandData(Delegate, String, String)

    Constructs the command data from the provided lambda.

    Declaration
    public LambdaCommandData(Delegate lambda, string commandName, string commandDescription = "")
    Parameters
    Type Name Description
    Delegate lambda

    The lambda to create a command from. To work around type system limitation you may need to first store the lambda in a strong delegate type like Action or Func.

    String commandName

    The name to use for the command.

    String commandDescription

    The description, if any, for the command.

    Methods

    GetInvocationTargets(MethodInfo)

    Declaration
    protected override IEnumerable<object> GetInvocationTargets(MethodInfo invokingMethod)
    Parameters
    Type Name Description
    MethodInfo invokingMethod
    Returns
    Type Description
    IEnumerable<Object>
    Overrides
    CommandData.GetInvocationTargets(MethodInfo)

    Extension Methods

    ArraySingleExtensions.AsArraySingle<T>(T)
    CollectionExtensions.Yield<T>(T)
    Quantum Console by QFSW
    Back to top