public bool Equals(SubscriptionKey other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(other._messageType, _messageType) && Equals(other._routingKey, _routingKey) && Equals(other._arguments, _arguments)); }
void UnsubscribeMessage <TMessage>(MessageProperties messageProperties) { ISubscription subscription; var key = new SubscriptionKey(typeof(TMessage), messageProperties); _subscriptions.TryGetValue(key, out subscription); if (subscription != null) { subscription.Stop(); _subscriptions.Remove(key); } }
void UnsubscribeMessage <TMessage>(string routingKey, IDictionary headers) { ISubscription subscription; var key = new SubscriptionKey(typeof(TMessage), routingKey, headers); _subscriptions.TryGetValue(key, out subscription); if (subscription != null) { subscription.Stop(); _subscriptions.Remove(key); } }
public bool Equals(SubscriptionKey other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other._messageType, _messageType) && Equals(other._routingKey, _routingKey) && Equals(other._arguments, _arguments); }
protected bool Equals(SubscriptionKey other) { return Equals(_messageType, other._messageType) && Equals(_messageProperties, other._messageProperties); }
protected bool Equals(SubscriptionKey other) { return(Equals(_messageType, other._messageType) && Equals(_messageProperties, other._messageProperties)); }