ServiceAction Constructor (String, ResourceType, OperationParameterBindingKind, IEnumerable<ServiceActionParameter>, ResourceSetPathExpression)
Initializes a new ServiceAction instance.
Namespace: System.Data.Services.Providers
Assembly: Microsoft.Data.Services (in Microsoft.Data.Services.dll)
Syntax
'Declaration
Public Sub New ( _
name As String, _
returnType As ResourceType, _
operationParameterBindingKind As OperationParameterBindingKind, _
parameters As IEnumerable(Of ServiceActionParameter), _
resultSetPathExpression As ResourceSetPathExpression _
)
'Usage
Dim name As String
Dim returnType As ResourceType
Dim operationParameterBindingKind As OperationParameterBindingKind
Dim parameters As IEnumerable(Of ServiceActionParameter)
Dim resultSetPathExpression As ResourceSetPathExpression
Dim instance As New ServiceAction(name, returnType, _
operationParameterBindingKind, _
parameters, resultSetPathExpression)
public ServiceAction(
string name,
ResourceType returnType,
OperationParameterBindingKind operationParameterBindingKind,
IEnumerable<ServiceActionParameter> parameters,
ResourceSetPathExpression resultSetPathExpression
)
public:
ServiceAction(
String^ name,
ResourceType^ returnType,
OperationParameterBindingKind operationParameterBindingKind,
IEnumerable<ServiceActionParameter^>^ parameters,
ResourceSetPathExpression^ resultSetPathExpression
)
new :
name:string *
returnType:ResourceType *
operationParameterBindingKind:OperationParameterBindingKind *
parameters:IEnumerable<ServiceActionParameter> *
resultSetPathExpression:ResourceSetPathExpression -> ServiceAction
public function ServiceAction(
name : String,
returnType : ResourceType,
operationParameterBindingKind : OperationParameterBindingKind,
parameters : IEnumerable<ServiceActionParameter>,
resultSetPathExpression : ResourceSetPathExpression
)
Parameters
- name
Type: System.String
Name of the action.
- returnType
Type: System.Data.Services.Providers.ResourceType
Return type of the action.
- operationParameterBindingKind
Type: System.Data.Services.Providers.OperationParameterBindingKind
the kind of the operation parameter binding (Never, Sometimes, Always).
- parameters
Type: System.Collections.Generic.IEnumerable<ServiceActionParameter>
In-order parameters for this action; the first parameter is the binding parameter.
- resultSetPathExpression
Type: System.Data.Services.Providers.ResourceSetPathExpression
Path expression to calculate the result resource set of the function if the action returns an entity or a collection of entity; null otherwise.
Remarks
The value of operationParameterBindingKind must be set to Sometimes or Always if the first parameter in parameters is the binding parameter or Never if the first parameter is not a binding parameter. If the value of operationParameterBindingKind is set to Always then the IDataServiceActionProvider.AdvertiseServiceAction method will not be called for the action and the action will be always advertised by the default convention.