示例#1
0
        /// <summary>
        /// Adds an element in this object.
        /// </summary>
        /// <param name="id">The identity of the element to add.</param>
        /// <param name="initialValue">The initial value of the element</param>
        /// <returns>The element object</returns>
        public Element AddElement(int id, ElementValue initialValue)
        {
            _storage.CreateElement(_id, id);
            Element el = new Element(_storage, _id, ApplicationType, id);

            el.Value = initialValue;
            return(el);
        }
示例#2
0
 /// <summary>
 /// Adds an element in this object.
 /// </summary>
 /// <param name="id">The identity of the element to add.</param>
 /// <param name="initialValue">The initial value of the element</param>
 /// <returns>The element object</returns>
 public Element AddElement(WellKnownElement id, ElementValue initialValue)
 {
     return AddElement((int)id, initialValue);
 }
示例#3
0
 /// <summary>
 /// Adds an element in this object.
 /// </summary>
 /// <param name="id">The identity of the element to add.</param>
 /// <param name="initialValue">The initial value of the element</param>
 /// <returns>The element object</returns>
 public Element AddElement(int id, ElementValue initialValue)
 {
     _storage.CreateElement(_id, id);
     Element el = new Element(_storage, _id, ApplicationType, id);
     el.Value = initialValue;
     return el;
 }
示例#4
0
 /// <summary>
 /// Adds an element in this object.
 /// </summary>
 /// <param name="id">The identity of the element to add.</param>
 /// <param name="initialValue">The initial value of the element</param>
 /// <returns>The element object</returns>
 public Element AddElement(WellKnownElement id, ElementValue initialValue)
 {
     return(AddElement((int)id, initialValue));
 }