Share via


DomainContext.InvokeOperation<TValue> Method (String, Type, IDictionary<String, Object>, Boolean, Action<InvokeOperation<TValue>>, Object)

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Executes an invoke operation.

Namespace:  System.ServiceModel.DomainServices.Client
Assembly:  System.ServiceModel.DomainServices.Client (in System.ServiceModel.DomainServices.Client.dll)

Syntax

'Declaration
Public Overridable Function InvokeOperation(Of TValue) ( _
    operationName As String, _
    returnType As Type, _
    parameters As IDictionary(Of String, Object), _
    hasSideEffects As Boolean, _
    callback As Action(Of InvokeOperation(Of TValue)), _
    userState As Object _
) As InvokeOperation(Of TValue)
'Usage
Dim instance As DomainContext
Dim operationName As String
Dim returnType As Type
Dim parameters As IDictionary(Of String, Object)
Dim hasSideEffects As Boolean
Dim callback As Action(Of InvokeOperation(Of TValue))
Dim userState As Object
Dim returnValue As InvokeOperation(Of TValue)

returnValue = instance.InvokeOperation(operationName, _
    returnType, parameters, hasSideEffects, _
    callback, userState)
public virtual InvokeOperation<TValue> InvokeOperation<TValue>(
    string operationName,
    Type returnType,
    IDictionary<string, Object> parameters,
    bool hasSideEffects,
    Action<InvokeOperation<TValue>> callback,
    Object userState
)
public:
generic<typename TValue>
virtual InvokeOperation<TValue>^ InvokeOperation(
    String^ operationName, 
    Type^ returnType, 
    IDictionary<String^, Object^>^ parameters, 
    bool hasSideEffects, 
    Action<InvokeOperation<TValue>^>^ callback, 
    Object^ userState
)
abstract InvokeOperation : 
        operationName:string * 
        returnType:Type * 
        parameters:IDictionary<string, Object> * 
        hasSideEffects:bool * 
        callback:Action<InvokeOperation<'TValue>> * 
        userState:Object -> InvokeOperation<'TValue> 
override InvokeOperation : 
        operationName:string * 
        returnType:Type * 
        parameters:IDictionary<string, Object> * 
        hasSideEffects:bool * 
        callback:Action<InvokeOperation<'TValue>> * 
        userState:Object -> InvokeOperation<'TValue> 
JScript does not support generic types and methods.

Type Parameters

  • TValue
    The type of value that will be returned.

Parameters

  • returnType
    Type: System.Type
    The return type of the operation.
  • hasSideEffects
    Type: System.Boolean
    true if the operation has side-effects; otherwise, false.
  • userState
    Type: System.Object
    Optional user state for the operation.

Return Value

Type: System.ServiceModel.DomainServices.Client.InvokeOperation<TValue>
The invoke operation.

Exceptions

Exception Condition
[ArgumentException]

operationName is empty or nulla null reference (Nothing in Visual Basic).

[ArgumentNullException]

returnType is nulla null reference (Nothing in Visual Basic).

See Also

Reference

DomainContext Class

InvokeOperation Overload

System.ServiceModel.DomainServices.Client Namespace