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
- trackingContext
Type: Microsoft.ServiceBus.Tracing.TrackingContext
The context of the tracking.
- messages
Type: System.Collections.Generic.IEnumerable<BrokeredMessage>
A list of BrokeredMessage objects to be sent.
- 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.
- callback
Type: System.AsyncCallback
A user callback to be invoked when the operation completes.
- 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.