Ejemplo n.º 1
0
 /// <summary>
 /// Constructs and returns a <see cref="IModel" /> representing a channel used to communicate with the broker
 /// </summary>
 /// <returns>a <see cref="IModel" /> representing a channel used to communicate with the broker</returns>
 public IModel CreateChannel()
 {
     lock (_lock)
     {
         return(ConnectionFactory.CreateConnection().CreateModel());
     }
 }
Ejemplo n.º 2
0
 private void AttachToConnectionEvents()
 {
     if (_connectionFactory != null)
     {
         _connectionFactory.CreateConnection().ConnectionShutdown += OnConnectionShutdown;
         _connectionFactory.CreateConnection().CallbackException  += OnCallbackException;
     }
 }