OperationInfo.Parameters Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a collection of OperationParameterInfo objects that represents the parameter definitions used by the operation.
public:
property System::Workflow::Activities::OperationParameterInfoCollection ^ Parameters { System::Workflow::Activities::OperationParameterInfoCollection ^ get(); };
public System.Workflow.Activities.OperationParameterInfoCollection Parameters { get; }
member this.Parameters : System.Workflow.Activities.OperationParameterInfoCollection
Public ReadOnly Property Parameters As OperationParameterInfoCollection
Property Value
A collection of OperationParameterInfo objects that represents the parameter definitions used by the operation when called by a client.
Examples
The following example demonstrates how to access the Parameters
property.
ReceiveActivity receive = new ReceiveActivity();
OperationInfo info = new OperationInfo();
info.Name = "Echo";
OperationParameterInfo parameterInfo = new OperationParameterInfo();
parameterInfo.Attributes = ((System.Reflection.ParameterAttributes)((System.Reflection.ParameterAttributes.Out | System.Reflection.ParameterAttributes.Retval)));
parameterInfo.Name = "(ReturnValue)";
parameterInfo.ParameterType = typeof(string);
parameterInfo.Position = -1;
info.Parameters.Add(parameterInfo);
receive.ServiceOperationInfo = info;
Dim receive As New ReceiveActivity()
Dim info As New OperationInfo()
info.Name = "Echo"
Dim parameterInfo As New OperationParameterInfo()
parameterInfo.Attributes = (CType((System.Reflection.ParameterAttributes.Out Or System.Reflection.ParameterAttributes.Retval), _
System.Reflection.ParameterAttributes))
parameterInfo.Name = "(ReturnValue)"
parameterInfo.ParameterType = GetType(String)
parameterInfo.Position = -1
info.Parameters.Add(parameterInfo)
receive.ServiceOperationInfo = info
Remarks
The Parameters
collection will contain one element for each parameter in the method signature of the operation, plus one element for the return value of the operation.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應