InvokeMethod.Parameters Propiedad

Definición

Colección de parámetros del método que se va a invocar.

public:
 property System::Collections::ObjectModel::Collection<System::Activities::Argument ^> ^ Parameters { System::Collections::ObjectModel::Collection<System::Activities::Argument ^> ^ get(); };
public System.Collections.ObjectModel.Collection<System.Activities.Argument> Parameters { get; }
member this.Parameters : System.Collections.ObjectModel.Collection<System.Activities.Argument>
Public ReadOnly Property Parameters As Collection(Of Argument)

Valor de propiedad

Colección de parámetros.

Ejemplos

En el ejemplo de código siguiente se muestra cómo establecer los parámetros de una InvokeMethod actividad. Este ejemplo procede del ejemplo Using the InvokeMethod Activity (Usar la actividad InvokeMethod ).

new InvokeMethod
{
    TargetObject = new InArgument<TestClass>(ctx => testClass),
    MethodName = "InstanceMethod",
    Parameters =
    {
        new InArgument<string>("My favorite number is"),
        new InArgument<int>(42),
        new InArgument<string>("first item of the param array"),
        new InArgument<string>("second item of the param array"),
        new InArgument<string>("third item of the param array")
    }
},

Comentarios

Los parámetros se deben agregar a la colección en el mismo orden en que aparecen en la firma del método. Los parámetros no se pueden denominar TargetObject ni Result.

Se aplica a