private MessageReceivePump(MessageReceiver receiver, Microsoft.ServiceBus.Messaging.OnMessageOptions onMessageOptions)
 {
     if (receiver == null)
     {
         throw new ArgumentNullException("receiver");
     }
     this.receiver         = receiver;
     this.OnMessageOptions = onMessageOptions;
     this.semaphore        = new AsyncSemaphore(onMessageOptions.MaxConcurrentCalls);
     this.renewSupported   = true;
     this.completionList   = new List <Guid>();
 }
 public MessageReceivePump(MessageReceiver receiver, Microsoft.ServiceBus.Messaging.OnMessageOptions onMessageOptions, Func <BrokeredMessage, Task> taskCallback) : this(receiver, onMessageOptions)
 {
     this.taskCallback  = taskCallback;
     this.beginCallback = new Func <BrokeredMessage, AsyncCallback, object, IAsyncResult>(this.BeginTaskCallback);
     this.endCallback   = new Action <IAsyncResult>(this.EndTaskCallback);
 }