public override void Dispose() { if (_channel != null) { _channel.Unsubscribe(_keys); _channel.Close(abort: true); } if (_connection != null) { _connection.Close(abort: true); } }
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); }
public virtual Task Unsubscribe() { return(connection.Unsubscribe(channel)); }
/** * 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); }
public virtual async Task Unsubscribe(string eventName) { var channel = Channel(eventName); await connection.Unsubscribe(channel); }