OnBeginDefer Method

Executes upon calling the OnDefer or BeginDefer operation.

Namespace:  Microsoft.ServiceBus.Messaging
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

Syntax

'Declaration
Protected Overrides Function OnBeginDefer ( _
    trackingContext As TrackingContext, _
    lockTokens As IEnumerable(Of Guid), _
    timeout As TimeSpan, _
    callback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
Dim trackingContext As TrackingContext
Dim lockTokens As IEnumerable(Of Guid)
Dim timeout As TimeSpan
Dim callback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

returnValue = Me.OnBeginDefer(trackingContext, _
    lockTokens, timeout, callback, state)
protected override IAsyncResult OnBeginDefer(
    TrackingContext trackingContext,
    IEnumerable<Guid> lockTokens,
    TimeSpan timeout,
    AsyncCallback callback,
    Object state
)
protected:
virtual IAsyncResult^ OnBeginDefer(
    TrackingContext^ trackingContext, 
    IEnumerable<Guid>^ lockTokens, 
    TimeSpan timeout, 
    AsyncCallback^ callback, 
    Object^ state
) override
abstract OnBeginDefer : 
        trackingContext:TrackingContext * 
        lockTokens:IEnumerable<Guid> * 
        timeout:TimeSpan * 
        callback:AsyncCallback * 
        state:Object -> IAsyncResult 
override OnBeginDefer : 
        trackingContext:TrackingContext * 
        lockTokens:IEnumerable<Guid> * 
        timeout:TimeSpan * 
        callback:AsyncCallback * 
        state:Object -> IAsyncResult 
protected override function OnBeginDefer(
    trackingContext : TrackingContext, 
    lockTokens : IEnumerable<Guid>, 
    timeout : TimeSpan, 
    callback : AsyncCallback, 
    state : Object
) : IAsyncResult

Parameters

  • state
    Type: System. . :: . .Object
    A user-defined object that contains state information about the asynchronous operation.

Return Value

Type: System. . :: . .IAsyncResult
An IAsyncResult that references the asynchronous operation to suspend processing of messages.

Remarks

Defer is called by the user when the consumer is not ready to process the message to defer the process into the future. After a message is Defered, the message can be received again with a call to Receive (messageReceipt).

This is a protected member of the abstract MessageSession class. Abstract classes are not meant to be inherited, so protected members should be ignored.

See Also

Reference

MessageSession Class

Microsoft.ServiceBus.Messaging Namespace