AbstractDataStructures.Phonebook.AddSubscriberByNameAndTown(string, Subscriber)

Here are the examples of the csharp api class AbstractDataStructures.Phonebook.AddSubscriberByNameAndTown(string, Subscriber) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: Telerik-Academy
Source File: Phonebook.cs
View license
public void AddSubscribers(ICollection<Subscriber> subscribers)
        {
            if (subscribers == null)
            {
                throw new ArgumentNullException("Collection cannot be null.");
            }

            if (subscribers != this.subscribers)
            {
                foreach (var subscriber in subscribers)
                {
                    this.subscribers.Add(subscriber);
                }
            }

            foreach (var subscriber in subscribers)
            {
                var subscriberNames = subscriber.Name.Split(' ');

                foreach (var name in subscriberNames)
                {
                    this.AddSubscriberByName(name, subscriber);

                    this.AddSubscriberByNameAndTown(name, subscriber);
                }
            }
        }