Compartilhar via


DomainContext.InvokeOperation Method (String, Type, IDictionary<String, Object>, Boolean, Action<InvokeOperation>, 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 ( _
    operationName As String, _
    returnType As Type, _
    parameters As IDictionary(Of String, Object), _
    hasSideEffects As Boolean, _
    callback As Action(Of InvokeOperation), _
    userState As Object _
) As InvokeOperation
'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)
Dim userState As Object
Dim returnValue As InvokeOperation

returnValue = instance.InvokeOperation(operationName, _
    returnType, parameters, hasSideEffects, _
    callback, userState)
public virtual InvokeOperation InvokeOperation(
    string operationName,
    Type returnType,
    IDictionary<string, Object> parameters,
    bool hasSideEffects,
    Action<InvokeOperation> callback,
    Object userState
)
public:
virtual InvokeOperation^ InvokeOperation(
    String^ operationName, 
    Type^ returnType, 
    IDictionary<String^, Object^>^ parameters, 
    bool hasSideEffects, 
    Action<InvokeOperation^>^ callback, 
    Object^ userState
)
abstract InvokeOperation : 
        operationName:string * 
        returnType:Type * 
        parameters:IDictionary<string, Object> * 
        hasSideEffects:bool * 
        callback:Action<InvokeOperation> * 
        userState:Object -> InvokeOperation 
override InvokeOperation : 
        operationName:string * 
        returnType:Type * 
        parameters:IDictionary<string, Object> * 
        hasSideEffects:bool * 
        callback:Action<InvokeOperation> * 
        userState:Object -> InvokeOperation 
public function InvokeOperation(
    operationName : String, 
    returnType : Type, 
    parameters : IDictionary<String, Object>, 
    hasSideEffects : boolean, 
    callback : Action<InvokeOperation>, 
    userState : Object
) : InvokeOperation

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
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