Example #1
0
        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);
        }
Example #2
0
 /// <summary>
 /// Adds new subscriber
 /// </summary>
 /// <param name="subscriber">Subscriber to be added</param>
 public void AddSubscriber(Subscriber subscriber)
 {
     this.AddSubscribers(new List<Subscriber>() { subscriber });
 }
Example #3
0
        private void AddSubscriberByName(string name, Subscriber subscriber)
        {
            if (!this.subscribersByName.ContainsKey(name))
            {
                this.subscribersByName[name] = new LinkedList<Subscriber>();
            }

            this.subscribersByName[name].AddLast(subscriber);
        }