ReceiveContext Class
Derive from this class to implement a custom state machine for receive context functionality.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
The ReceiveContext type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Abandon(TimeSpan) | Causes the state machine to transition to the abandoned state with the specified timeout value. |
![]() | Abandon(Exception, TimeSpan) | Causes the state machine to transition to the abandoned state with the specified exception and timeout value. |
![]() | BeginAbandon(TimeSpan, AsyncCallback, Object) | Begins an asynchronous abandon operation with the specified timeout, asynchronous callback, and user-defined state data. |
![]() | BeginAbandon(Exception, TimeSpan, AsyncCallback, Object) | Begins an asynchronous abandon operation with the specified exception, timeout, asynchronous callback, and user-defined state data. |
![]() | BeginComplete | Begins an asynchronous complete operation with the specified timeout, asynchronous callback, and user-defined state data. |
![]() | Complete | Causes the state machine to transition to the completed state with the specified timeout value. |
![]() | EndAbandon | Completes an asynchronous abandon operation. |
![]() | EndComplete | Completes an asynchronous complete operation. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Fault | Causes the state machine to transition to the faulted state. |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OnAbandon(TimeSpan) | Called when the state machine is transitioning to the abandoned state with the specified timeout value. |
![]() | OnAbandon(Exception, TimeSpan) | Called when the state machine is transitioning to the abandoned state with the specified exception and timeout value. |
![]() | OnBeginAbandon(TimeSpan, AsyncCallback, Object) | Called when the state machine is transitioning to the abandoned state asynchronously with the specified timeout value, callback, and state data. |
![]() | OnBeginAbandon(Exception, TimeSpan, AsyncCallback, Object) | Called when the state machine is transitioning to the abandoned state asynchronously with the specified exception, timeout value, callback, and state data. |
![]() | OnBeginComplete | Called when the state machine is transitioning to the completed state asynchronously with the specified timeout, callback, and state data. |
![]() | OnComplete | Called when the state machine is transitioning to the completed state with the specified timeout value. |
![]() | OnEndAbandon | Called when the state machine is transitioning to the abandoned state asynchronously. |
![]() | OnEndComplete | Called when the state machine is transitioning to the completed state asynchronously. |
![]() | OnFaulted | Called when the state machine is transitioning to the faulted state. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() ![]() | TryGet(Message, ReceiveContext%) | Attempts to get the receive context from the specified message. |
![]() ![]() | TryGet(MessageProperties, ReceiveContext%) | Attempts to get the receive context from the specified message properties collection. |
Receive context functionality is two-fold. When working with a queued channel, receive context allows you to lock a message prior to processing it. If a failure occurs, the message remains locked so that the service that is processing the message maintains ownership (another service cannot receive and process the same message) and may choose to perform some other action on it. When working with a one-way channel, receive context allows a service to control when it sends an acknowledgement message or it can indicate a problem by sending a negative acknowledgement message. The client can then choose to resend the message if it receives a negative acknowledgement or if it does not receive an acknowledgement within a certain period of time.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
