ServiceAction Constructor (String, ResourceType, ResourceSet, OperationParameterBindingKind, IEnumerable<ServiceActionParameter>)
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, _
resultSet As ResourceSet, _
operationParameterBindingKind As OperationParameterBindingKind, _
parameters As IEnumerable(Of ServiceActionParameter) _
)
'Usage
Dim name As String
Dim returnType As ResourceType
Dim resultSet As ResourceSet
Dim operationParameterBindingKind As OperationParameterBindingKind
Dim parameters As IEnumerable(Of ServiceActionParameter)
Dim instance As New ServiceAction(name, returnType, _
resultSet, operationParameterBindingKind, _
parameters)
public ServiceAction(
string name,
ResourceType returnType,
ResourceSet resultSet,
OperationParameterBindingKind operationParameterBindingKind,
IEnumerable<ServiceActionParameter> parameters
)
public:
ServiceAction(
String^ name,
ResourceType^ returnType,
ResourceSet^ resultSet,
OperationParameterBindingKind operationParameterBindingKind,
IEnumerable<ServiceActionParameter^>^ parameters
)
new :
name:string *
returnType:ResourceType *
resultSet:ResourceSet *
operationParameterBindingKind:OperationParameterBindingKind *
parameters:IEnumerable<ServiceActionParameter> -> ServiceAction
public function ServiceAction(
name : String,
returnType : ResourceType,
resultSet : ResourceSet,
operationParameterBindingKind : OperationParameterBindingKind,
parameters : IEnumerable<ServiceActionParameter>
)
Parameters
- name
Type: System.String
Name of the action.
- returnType
Type: System.Data.Services.Providers.ResourceType
Return type of the action.
- resultSet
Type: System.Data.Services.Providers.ResourceSet
Result resource set of the action if the action returns an entity or a collection of entity; null otherwise.
- 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.
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.