MessageSender.OnBeginSend Method

Allows concrete implementations to define what should be done when sending messages. This method cannot be implemented in a concrete class by the user.

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

Syntax

'Declaration
Protected MustOverride Function OnBeginSend ( _
    trackingContext As TrackingContext, _
    messages As IEnumerable(Of BrokeredMessage), _
    timeout As TimeSpan, _
    callback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
Dim trackingContext As TrackingContext
Dim messages As IEnumerable(Of BrokeredMessage)
Dim timeout As TimeSpan
Dim callback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

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

Parameters

  • timeout
    Type: System.TimeSpan
    A client side timeout value for the operation. The operation should be aborted or cancelled if the duration exceeds this timeout.
  • state
    Type: System.Object
    The state to be passed to the callback when the operation completes.

Return Value

Type: System.IAsyncResult
A IAsyncResult for the operation.

See Also

Reference

MessageSender Class

Microsoft.ServiceBus.Messaging Namespace