ServiceAction Constructor (String, ResourceType, OperationParameterBindingKind, IEnumerable<ServiceActionParameter>, ResourceSetPathExpression)

WCF Data Services 5.0

Initializes a new ServiceAction instance.

Namespace:  System.Data.Services.Providers
Assembly:  Microsoft.Data.Services (in Microsoft.Data.Services.dll)

public ServiceAction(
	string name,
	ResourceType returnType,
	OperationParameterBindingKind operationParameterBindingKind,
	IEnumerable<ServiceActionParameter> parameters,
	ResourceSetPathExpression resultSetPathExpression
)

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.

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.

Show: