InvokeMethod.Parameters Właściwość

Definicja

Kolekcja parametrów metody do wywołania.

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)

Wartość właściwości

Kolekcja parametrów.

Przykłady

W poniższym przykładzie kodu pokazano ustawienie parametrów InvokeMethod działania. Ten przykład pochodzi z przykładu Using the InvokeMethod Activity (Używanie działania 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")
    }
},

Uwagi

Parametry muszą zostać dodane do kolekcji w tej samej kolejności, w której są wyświetlane w podpisie metody. Parametrów nie można nazwać TargetObject ani Result.

Dotyczy