Beispiel #1
0
        public void Insert(int index, XBase value)
        {
            if (value == null || value.GetType() != _ChildItemType)
            {
                throw new Exception("类型不正确。请输入类型为" + _ChildItemType.ToString() + "的变量。");
            }

            // Use base class to process actual collection operation
            _List.Insert(index, value);
        }
Beispiel #2
0
        public virtual XBase Add(XBase value)
        {
            //if( value == null || TypeHelper.IsXMLObjectType( value.GetType() ) == false )
            if (value == null)
            {
                throw new ArgumentNullException();
            }
            if (value.GetType() != _ChildItemType)
            {
                throw new Exception("类型不正确。请输入类型为" + XObjectHelper.XBaseType.ToString() + "的变量。_ChildItemType=" + _ChildItemType.ToString() + " valueType" + value.GetType().ToString());
            }

            // Use base class to process actual collection operation
            return(_List.Add(value));
        }
Beispiel #3
0
 public int IndexOf(XBase value)
 {
     // Find the 0 based index of the requested entry
     return(_List.IndexOf(value));
 }
Beispiel #4
0
 public bool Contains(XBase value)
 {
     // Use base class to process actual collection operation
     return(_List.Contains(value));
 }
Beispiel #5
0
 public void Remove(XBase value)
 {
     // Use base class to process actual collection operation
     _List.Remove(value);
 }
Beispiel #6
0
 public int IndexOf(XBase value)
 {
     return(List.IndexOf(value));
 }
Beispiel #7
0
 public bool Contains(XBase value)
 {
     return(List.Contains(value as object));
 }
Beispiel #8
0
 public void Insert(int index, XBase value)
 {
     List.Insert(index, value as object);
 }
Beispiel #9
0
 public void Remove(XBase value)
 {
     List.Remove(value as object);
 }
Beispiel #10
0
 public XBase Add(XBase value)
 {
     List.Add(value as object);
     return(value);
 }