public static void Add <T>(System.Collections.Generic.IList <T> items, T child, int index, Net.Vpc.Upa.UPAObject newParent, Net.Vpc.Upa.UPAObject obj, Net.Vpc.Upa.Impl.Util.ItemInterceptor <T> interceptor) where T : Net.Vpc.Upa.UPAObject { if (index < 0) { index = (items).Count + index + 1; } if (index < 0) { throw new System.IndexOutOfRangeException("Invalid Index " + (index)); } if (index > (items).Count) { throw new System.IndexOutOfRangeException("Invalid Index " + (index)); } if (interceptor != null) { interceptor.Before(child, index); } Net.Vpc.Upa.UPAObjectListener[] objectListeners = obj.GetObjectListeners(); foreach (Net.Vpc.Upa.UPAObjectListener li in objectListeners) { li.ItemAdded(child, index, newParent, Net.Vpc.Upa.EventPhase.BEFORE); } items.Insert(index, child); if (interceptor != null) { interceptor.After(child, index); } foreach (Net.Vpc.Upa.UPAObjectListener li in objectListeners) { li.ItemAdded(child, index, newParent, Net.Vpc.Upa.EventPhase.AFTER); } }
static void Main(string[] args) { LinkedList <int> list = new LinkedList <int> { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; list.Print(); System.Collections.Generic.IList <int> iList = list; iList.RemoveAt(5); iList.RemoveAt(2); list.Print(); iList.Insert(3, 100); iList[3]++; foreach (int i in iList) { Console.Write("{0}|", i); } list.Clear(); list.Print(); list.Add(5); list.Print(); }
public virtual Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledQueryField AddField(int index, Net.Vpc.Upa.Impl.Uql.Compiledexpression.DefaultCompiledExpression expression, string alias) { Invalidate(); Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledQueryField field = new Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledQueryField(alias, expression); fields.Insert(index, field); PrepareChildren(field.GetExpression()); return(field); }
public static void ListInsertRange <E>(System.Collections.Generic.IList <E> list, int index, System.Collections.Generic.ICollection <E> items) { int x = index; foreach (E i in items) { list.Insert(x++, i); } }
public virtual Net.Vpc.Upa.Expressions.GroupCriteria InsertGroup(int index, Net.Vpc.Upa.Expressions.Expression field) { fields.Insert(index, field); return(this); }
public virtual Net.Vpc.Upa.Expressions.Select Field(int index, Net.Vpc.Upa.Expressions.Expression expression, string alias) { fields.Insert(index, new Net.Vpc.Upa.Expressions.QueryField(alias, expression)); return(this); }
public static void MoveTo <T>(System.Collections.Generic.IList <T> list, int index, int toIndex) { T r = Net.Vpc.Upa.Impl.FwkConvertUtils.ListRemoveAt <T>(list, index); list.Insert(toIndex, r); }
public virtual void Insert(int index, object @value) { elements.Insert(index, @value); }
public static void InsertItemLocation (this System.Collections.Generic.IList <MoreExpressions> Expression, int Index, MoreExpressions Item) { Expression.Insert(ToItemLocation(Expression, Index), Item); }
public virtual void Insert(int index, ENTITY value) { _selectedList.Insert(index, value); }
public virtual Net.Vpc.Upa.Expressions.Insert Set(int index, Net.Vpc.Upa.Expressions.Expression @value) { fields.Insert(index, new Net.Vpc.Upa.Expressions.VarVal(fields[index].GetVar(), @value)); return(this); }