public IAsyncResult BeginSend(IBrokeredMessage message, AsyncCallback callback, object state)
 {
     if (!(message is BrokeredMessageWrapper))
     {
         throw new ArgumentOutOfRangeException("message", "message must be BrokeredMessage for Azure use");
     }
     return(topicClient.BeginSend((message as BrokeredMessageWrapper).GetMessage(), callback, state));
 }
Beispiel #2
0
 protected virtual void DoBeginSendMessage(BrokeredMessage message, AsyncCallback ac)
 {
     try {
         topicClient.BeginSend(message, ac, message);
     } catch {
         message.Dispose();
         throw;
     }
 }
Beispiel #3
0
 public static Task SendAsync(this TopicClient client, BrokeredMessage message)
 {
     return(Task.Factory.FromAsync((cb, state) => client.BeginSend((BrokeredMessage)state, cb, null), client.EndSend, message));
 }
Beispiel #4
0
 public IAsyncResult BeginSend(BrokeredMessage message, AsyncCallback callback, object state)
 {
     return(_queueClient != null
                ? _queueClient.BeginSend(message, callback, state)
                : _sender.BeginSend(message, callback, state));
 }