/// <summary> /// This will return all payload items. Multiple items are possible, but doe the most implementaions one item should be enough /// </summary> /// <returns> returns an Array of Items </returns> public Item[] GetItems() { ElementList nl = SelectElements(typeof (Item)); var items = new Item[nl.Count]; int i = 0; foreach (Element e in nl) { items[i] = (Item) e; i++; } return items; }
/// <summary> /// Add a payload Item /// </summary> /// <returns> returns the added Item </returns> public Item AddItem() { var item = new Item(); AddChild(item); return item; }
/// <summary> /// </summary> /// <param name="item"> </param> /// <returns> returns the added item </returns> public Item AddItem(Item item) { AddChild(item); return item; }
public Publish(string node, Item item) : this(node) { AddItem(item); }