Share via


MessageSender.OnBeginSend Method

Allows concrete implementations to define what should be done when sending the messages parameter.

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

Syntax

'Declaration
Protected MustOverride Function OnBeginSend ( _
    messages As IEnumerable(Of BrokeredMessage), _
    timeout As TimeSpan, _
    callback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
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(messages, _
    timeout, callback, state)
protected abstract IAsyncResult OnBeginSend(
    IEnumerable<BrokeredMessage> messages,
    TimeSpan timeout,
    AsyncCallback callback,
    Object state
)
protected:
virtual IAsyncResult^ OnBeginSend(
    IEnumerable<BrokeredMessage^>^ messages, 
    TimeSpan timeout, 
    AsyncCallback^ callback, 
    Object^ state
) abstract
abstract OnBeginSend : 
        messages:IEnumerable<BrokeredMessage> * 
        timeout:TimeSpan * 
        callback:AsyncCallback * 
        state:Object -> IAsyncResult 
protected abstract function OnBeginSend(
    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. Typically the timeout comes from OperationTimeout.
  • callback
    Type: System.AsyncCallback
    A user callback method to be invoked when the operation completes.
  • state
    Type: System.Object
    The state to be passed to the callback when the operation is complete.

Return Value

Type: System.IAsyncResult
The IAsyncResult for the operation.

See Also

Reference

MessageSender Class

Microsoft.ServiceBus.Messaging Namespace