InvokeMethod.Parameters Proprietà

Definizione

Raccolta di parametri del metodo da richiamare.

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)

Valore della proprietà

Raccolta di parametri.

Esempio

Nell'esempio di codice seguente viene illustrata l'impostazione dei parametri di un'attività InvokeMethod . Questo esempio proviene dall'esempio Using the InvokeMethod Activity .This example is from the Using the InvokeMethod Activity sample.

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")
    }
},

Commenti

I parametri devono essere aggiunti alla raccolta nello stesso ordine in cui vengono visualizzati nella firma del metodo. I parametri non possono essere denominati TargetObject o Result.

Si applica a