IEnumerator IEnumerable.GetEnumerator() { GoCollectionEnumerator goCollectionEnumerator = this; goCollectionEnumerator.Reset(); return(goCollectionEnumerator); }
IEnumerator <GoObject> IEnumerable <GoObject> .GetEnumerator() { GoCollectionEnumerator goCollectionEnumerator = this; goCollectionEnumerator.Reset(); return(goCollectionEnumerator); }
/// <summary> /// Gets an enumerator for iterating over the GoObjects. /// </summary> public GoCollectionEnumerator GetEnumerator() { GoCollectionEnumerator result = this; result.Reset(); return(result); }
/// <summary> /// Gets an enumerator for iterating over the GoObjects in this collection. /// </summary> public virtual GoCollectionEnumerator GetEnumerator() { GoCollectionEnumerator result = new GoCollectionEnumerator(myObjects, forward: true); result.myOriginalCollection = this; result.myOriginalChanges = myChanges; return(result); }
/// <summary> /// Call <see cref="M:Northwoods.Go.GoObject.AddSelectionHandles(Northwoods.Go.GoSelection,Northwoods.Go.GoObject)" /> on the /// <see cref="P:Northwoods.Go.GoObject.SelectionObject" /> of each selected object /// if <see cref="M:Northwoods.Go.GoObject.CanView" /> is true, or call /// <see cref="M:Northwoods.Go.GoObject.RemoveSelectionHandles(Northwoods.Go.GoSelection)" /> otherwise. /// </summary> /// <seealso cref="M:Northwoods.Go.GoSelection.RemoveAllSelectionHandles" /> public void AddAllSelectionHandles() { using (GoCollectionEnumerator goCollectionEnumerator = GetEnumerator()) { while (goCollectionEnumerator.MoveNext()) { GoObject current = goCollectionEnumerator.Current; GoObject selectionObject = current.SelectionObject; if (selectionObject != null) { if (current.CanView()) { selectionObject.AddSelectionHandles(this, current); } else { selectionObject.RemoveSelectionHandles(this); } } } } }