public override void Dispose()
        {
            if (_channel != null)
            {
                _channel.Unsubscribe(_keys);
                _channel.Close(abort: true);
            }

            if (_connection != null)
            {
                _connection.Close(abort: true);
            }
        }
예제 #2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_channel != null)
                {
                    _channel.Unsubscribe(_keys);
                    _channel.Close(abort: true);
                }

                if (_connection != null)
                {
                    _connection.Close(abort: true);
                }
            }

            base.Dispose(disposing);
        }
예제 #3
0
 public virtual Task Unsubscribe()
 {
     return(connection.Unsubscribe(channel));
 }
예제 #4
0
 /**
  * Called when we want to switch notification of new work.
  */
 protected void ExitListeningState()
 {
     Log.Info(DateTime.Now.ToString());
     Log.Info("Exiting listening state.");
     subscriberConnection.Unsubscribe(configuration.Queue);
 }
예제 #5
0
        public virtual async Task Unsubscribe(string eventName)
        {
            var channel = Channel(eventName);

            await connection.Unsubscribe(channel);
        }