public void AddSubscribers(Subscriber[] subscribers) { foreach (Subscriber subscriber in subscribers) { AddSubscriber(subscriber); } }
/// <summary> /// Add a Subscriber /// </summary> /// <returns></returns> public Subscriber AddSubscriber() { Subscriber subscriber = new Subscriber(); AddChild(subscriber); return subscriber; }
/// <summary> /// Add a Subscriber /// </summary> /// <param name="subscriber">the Subscriber to add</param> /// <returns></returns> public Subscriber AddSubscriber(Subscriber subscriber) { AddChild(subscriber); return subscriber; }
/// <summary> /// /// </summary> /// <returns></returns> public Subscriber[] GetSubscribers() { ElementList nl = SelectElements(typeof(Subscriber)); Subscriber[] subscribers = new Subscriber[nl.Count]; int i = 0; foreach (Element e in nl) { subscribers[i] = (Subscriber) e; i++; } return subscribers; }