public bool Equals(Subscription other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return other.HandlerType == HandlerType && other.Priority == Priority; }
private void AddSubscription(Type messageType, Type handlerType, Int32 priority) { if (!_subscription.ContainsKey(messageType)) _subscription[messageType] = new List<Subscription>(); var subscription = new Subscription(handlerType, priority); if (!_subscription[messageType].Contains(subscription)) _subscription[messageType].Add(subscription); }