private void AddSubscriberByNameAndTown(string name, Subscriber subscriber) { var tuple = new Tuple<string, string>(name, subscriber.Town); if (!this.subscribersByNameAndTown.ContainsKey(tuple)) { this.subscribersByNameAndTown[tuple] = new LinkedList<Subscriber>(); } this.subscribersByNameAndTown[tuple].AddLast(subscriber); }
/// <summary> /// Adds new subscriber /// </summary> /// <param name="subscriber">Subscriber to be added</param> public void AddSubscriber(Subscriber subscriber) { this.AddSubscribers(new List<Subscriber>() { subscriber }); }
private void AddSubscriberByName(string name, Subscriber subscriber) { if (!this.subscribersByName.ContainsKey(name)) { this.subscribersByName[name] = new LinkedList<Subscriber>(); } this.subscribersByName[name].AddLast(subscriber); }