ReceiveContext Class

.NET Framework (current version)
 

Derive from this class to implement a custom state machine for receive context functionality.

Namespace:   System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

System.Object
  System.ServiceModel.Channels.ReceiveContext

public abstract class ReceiveContext

NameDescription
System_CAPS_protmethodReceiveContext()

Initializes a new instance of the ReceiveContext class.

NameDescription
System_CAPS_pubpropertyState

Gets or sets the state of the state machine.

System_CAPS_protpropertyThisLock

An object used for locking the ReceiveContext instance.

NameDescription
System_CAPS_pubmethodAbandon(Exception, TimeSpan)

Causes the state machine to transition to the abandoned state with the specified exception and timeout value.

System_CAPS_pubmethodAbandon(TimeSpan)

Causes the state machine to transition to the abandoned state with the specified timeout value.

System_CAPS_pubmethodBeginAbandon(Exception, TimeSpan, AsyncCallback, Object)

Begins an asynchronous abandon operation with the specified exception, timeout, asynchronous callback, and user-defined state data.

System_CAPS_pubmethodBeginAbandon(TimeSpan, AsyncCallback, Object)

Begins an asynchronous abandon operation with the specified timeout, asynchronous callback, and user-defined state data.

System_CAPS_pubmethodBeginComplete(TimeSpan, AsyncCallback, Object)

Begins an asynchronous complete operation with the specified timeout, asynchronous callback, and user-defined state data.

System_CAPS_pubmethodComplete(TimeSpan)

Causes the state machine to transition to the completed state with the specified timeout value.

System_CAPS_pubmethodEndAbandon(IAsyncResult)

Completes an asynchronous abandon operation.

System_CAPS_pubmethodEndComplete(IAsyncResult)

Completes an asynchronous complete operation.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFault()

Causes the state machine to transition to the faulted state.

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnAbandon(Exception, TimeSpan)

Called when the state machine is transitioning to the abandoned state with the specified exception and timeout value.

System_CAPS_protmethodOnAbandon(TimeSpan)

Called when the state machine is transitioning to the abandoned state with the specified timeout value.

System_CAPS_protmethodOnBeginAbandon(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.

System_CAPS_protmethodOnBeginAbandon(TimeSpan, AsyncCallback, Object)

Called when the state machine is transitioning to the abandoned state asynchronously with the specified timeout value, callback, and state data.

System_CAPS_protmethodOnBeginComplete(TimeSpan, AsyncCallback, Object)

Called when the state machine is transitioning to the completed state asynchronously with the specified timeout, callback, and state data.

System_CAPS_protmethodOnComplete(TimeSpan)

Called when the state machine is transitioning to the completed state with the specified timeout value.

System_CAPS_protmethodOnEndAbandon(IAsyncResult)

Called when the state machine is transitioning to the abandoned state asynchronously.

System_CAPS_protmethodOnEndComplete(IAsyncResult)

Called when the state machine is transitioning to the completed state asynchronously.

System_CAPS_protmethodOnFaulted()

Called when the state machine is transitioning to the faulted state.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticTryGet(Message, ReceiveContext)

Attempts to get the receive context from the specified message.

System_CAPS_pubmethodSystem_CAPS_staticTryGet(MessageProperties, ReceiveContext)

Attempts to get the receive context from the specified message properties collection.

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticName

The name of the receive context.

NameDescription
System_CAPS_pubeventFaulted

Defines the event to raised when an exception has occurred during the messaging process.

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.

.NET Framework
Available since 4.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: