示例#1
0
 /// <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;
 }
示例#2
0
 /// <summary>
 ///   Add a payload Item
 /// </summary>
 /// <returns> returns the added Item </returns>
 public Item AddItem()
 {
     var item = new Item();
     AddChild(item);
     return item;
 }
示例#3
0
 /// <summary>
 /// </summary>
 /// <param name="item"> </param>
 /// <returns> returns the added item </returns>
 public Item AddItem(Item item)
 {
     AddChild(item);
     return item;
 }
示例#4
0
 public Publish(string node, Item item) : this(node)
 {
     AddItem(item);
 }