InvokeOperation<TValue> Class
[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.]
Represents an asynchronous invoke operation.
Inheritance Hierarchy
System.Object
System.ServiceModel.DomainServices.Client.OperationBase
System.ServiceModel.DomainServices.Client.InvokeOperation
System.ServiceModel.DomainServices.Client.InvokeOperation<TValue>
Namespace: System.ServiceModel.DomainServices.Client
Assembly: System.ServiceModel.DomainServices.Client (in System.ServiceModel.DomainServices.Client.dll)
Syntax
'Declaration
Public NotInheritable Class InvokeOperation(Of TValue) _
Inherits InvokeOperation
'Usage
Dim instance As InvokeOperation(Of TValue)
public sealed class InvokeOperation<TValue> : InvokeOperation
generic<typename TValue>
public ref class InvokeOperation sealed : public InvokeOperation
[<SealedAttribute>]
type InvokeOperation<'TValue> =
class
inherit InvokeOperation
end
JScript does not support generic types and methods.
Type Parameters
- TValue
The type of return value for the invoke operation.
The InvokeOperation<TValue> type exposes the following members.
Properties
Name | Description | |
---|---|---|
![]() |
CanCancel | Gets a value that indicates whether this OperationBase is currently in a state that enables it to be canceled. (Inherited from OperationBase.) |
![]() |
Error | Gets the operation error if the operation failed. (Inherited from OperationBase.) |
![]() |
HasError | Gets a value that indicates whether the operation failed. (Inherited from OperationBase.) |
![]() |
IsCanceled | Gets a value that indicates whether this operation has been canceled. (Inherited from OperationBase.) |
![]() |
IsComplete | Gets a value that indicates whether this operation has completed. (Inherited from OperationBase.) |
![]() |
IsErrorHandled | Gets or sets a value that indicates whether the operation error has been handled. (Inherited from OperationBase.) |
![]() |
OperationName | Gets the name of the operation. (Inherited from InvokeOperation.) |
![]() |
Parameters | Gets the collection of parameters to the operation. (Inherited from InvokeOperation.) |
![]() |
Result | Gets the DomainClientResult for this operation. (Inherited from InvokeOperation.) |
![]() |
SupportsCancellation | Gets a value indicating whether this operation supports cancellation. (Inherited from InvokeOperation.) |
![]() |
UserState | Gets the optional user state for this operation. (Inherited from OperationBase.) |
![]() |
ValidationErrors | Gets the validation errors for this operation. (Inherited from InvokeOperation.) |
![]() |
Value | Gets the return value for the invoke operation. |
Top
Methods
Name | Description | |
---|---|---|
![]() |
Cancel | Cancels the operation. (Inherited from OperationBase.) |
![]() |
CancelCore | Invokes the cancel callback. (Inherited from InvokeOperation.) |
![]() |
Complete(Exception) | Completes a failed operation with the specified error. (Inherited from OperationBase.) |
![]() |
Complete(Object) | Completes a successful operation with the specified result. (Inherited from OperationBase.) |
![]() |
Equals | (Inherited from Object.) |
![]() |
Finalize | (Inherited from Object.) |
![]() |
GetHashCode | (Inherited from Object.) |
![]() |
GetType | (Inherited from Object.) |
![]() |
InvokeCompleteAction | Invokes the completion callback. (Inherited from InvokeOperation.) |
![]() |
MarkErrorAsHandled | Specifies that an error encountered in an operation is handled. (Inherited from OperationBase.) |
![]() |
MemberwiseClone | (Inherited from Object.) |
![]() |
OnPropertyChanged | Called when the value of a property changes. (Inherited from OperationBase.) |
![]() |
RaisePropertyChanged | Raises the System#ComponentModel#INotifyPropertyChanged#PropertyChanged() event. (Inherited from OperationBase.) |
![]() |
ToString | (Inherited from Object.) |
Top
Events
Name | Description | |
---|---|---|
![]() |
Completed | Occurs when the operation completes. (Inherited from OperationBase.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
![]() ![]() |
INotifyPropertyChanged.PropertyChanged | Occurs when a property value changes. (Inherited from OperationBase.) |
Top
Examples
<EnableClientAccess()>
Public Class CustomerDomainService
Inherits LinqToEntitiesDomainService(Of AdventureWorksLTEntities)
<Invoke()>
Public Function CountCustomers() As Integer
Return Me.ObjectContext.Customers.Count()
End Function
End Class
[EnableClientAccess()]
public class CustomerDomainService : LinqToEntitiesDomainService<AdventureWorksLTEntities>
{
[Invoke]
public int CountCustomers()
{
return this.ObjectContext.Customers.Count();
}
}
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.