Exemplo n.º 1
0
 private void OnMessageSession(IAsyncResult ar)
 {
     try
     {
         _logger.Write(LogLevel.Info, "Got message session " + _sessionId);
         _session = _readQueueClient.EndAcceptMessageSession(ar);
         _session.BeginReceive(OnMessage, null);
     }
     catch (Exception exception)
     {
         BusFailed(this, new ExceptionEventArgs(exception));
     }
 }
Exemplo n.º 2
0
 private void OnMessageSession(IAsyncResult ar)
 {
     try
     {
         _session = _readQueueClient.EndAcceptMessageSession(ar);
         _logger.Write(LogLevel.Info, "Are not listening on session " + _sessionId);
         _session.BeginReceive(OnMessage, null);
     }
     catch (Exception exception)
     {
         _logger.Write(LogLevel.Error, "Failed to EndAcceptMessageSession " + _sessionId, exception);
         BusFailed(this, new ExceptionEventArgs(exception));
     }
 }