Example #1
0
 /// <summary>
 /// Sets the <see cref="IPartitionReceiveHandler"/> to process events.
 /// </summary>
 /// <param name="receiveHandler">The <see cref="IPartitionReceiveHandler"/> used to process events.</param>
 /// <param name="invokeWhenNoEvents">Flag to indicate whether the handler should be invoked when the receive call times out.</param>
 public void SetReceiveHandler(IPartitionReceiveHandler receiveHandler, bool invokeWhenNoEvents = false)
 {
     EventHubsEventSource.Log.SetReceiveHandlerStart(this.ClientId, receiveHandler != null ? receiveHandler.GetType().ToString() : "null");
     this.OnSetReceiveHandler(receiveHandler, invokeWhenNoEvents);
     EventHubsEventSource.Log.SetReceiveHandlerStop(this.ClientId);
 }
 /// <summary>
 /// Sets the <see cref="IPartitionReceiveHandler"/> to process events.
 /// </summary>
 /// <param name="receiveHandler">The <see cref="IPartitionReceiveHandler"/> used to process events.</param>
 public void SetReceiveHandler(IPartitionReceiveHandler receiveHandler)
 {
     EventHubsEventSource.Log.SetReceiveHandlerStart(this.ClientId, receiveHandler != null ? receiveHandler.GetType().ToString() : "null");
     this.OnSetReceiveHandler(receiveHandler);
     EventHubsEventSource.Log.SetReceiveHandlerStop(this.ClientId);
 }