コード例 #1
0
ファイル: ProjectItem.cs プロジェクト: ikvm/webmatrix
 protected internal void RemoveChildItem(ProjectItem item)
 {
     if (item == null)
     {
         throw new ArgumentNullException();
     }
     int index = this.IndexOfChildItem(item);
     if (index == -1)
     {
         throw new ArgumentException();
     }
     item.SetParent(null);
     this._childItems.RemoveAt(index);
 }
コード例 #2
0
ファイル: ProjectItem.cs プロジェクト: ikvm/webmatrix
 protected void InsertChildItem(int index, ProjectItem item)
 {
     if (item == null)
     {
         throw new ArgumentNullException();
     }
     if (this._childItems == null)
     {
         if (index != 0)
         {
             throw new ArgumentOutOfRangeException();
         }
         this._childItems = new ArrayList();
     }
     this._childItems.Insert(index, item);
     item.SetParent(this);
 }
コード例 #3
0
ファイル: ProjectItem.cs プロジェクト: ikvm/webmatrix
 protected internal void AddChildItem(ProjectItem item)
 {
     if (item == null)
     {
         throw new ArgumentNullException();
     }
     if (this._childItems == null)
     {
         this._childItems = new ArrayList();
     }
     this._childItems.Add(item);
     item.SetParent(this);
 }