private void RemoveItemFromSubgroupsByExhaustiveSearch(CollectionViewGroupInternal group, object item) { if (this.RemoveFromGroupDirectly(group, item)) { for (var i = group.Items.Count - 1; i >= 0; i--) { var internal2 = group.Items[i] as CollectionViewGroupInternal; if (internal2 != null) { this.RemoveItemFromSubgroupsByExhaustiveSearch(internal2, item); } } } }
private bool RemoveFromSubgroup(object item, CollectionViewGroupInternal group, int level, object name) { var flag = false; var num = 0; var count = group.Items.Count; while (num < count) { var internal2 = group.Items[num] as CollectionViewGroupInternal; if ((internal2 != null) && group.GroupBy.NamesMatch(internal2.Name, name)) { if (this.RemoveFromSubgroups(item, internal2, level + 1)) { flag = true; } return(flag); } num++; } return(true); }
private void InitializeGroup(CollectionViewGroupInternal group, int level) { var groupDescription = this.GetGroupDescription(group, level); group.GroupBy = groupDescription; var observables = (groupDescription != null) ? groupDescription.GroupNames : null; if (observables != null) { var num = 0; var count = observables.Count; while (num < count) { var internal2 = new CollectionViewGroupInternal(observables[num], group); this.InitializeGroup(internal2, level + 1); group.Add(internal2); num++; } } group.LastIndex = 0; }
// Methods public LeafEnumerator(CollectionViewGroupInternal group) { this._group = group; this.DoReset(); }
// Methods internal CollectionViewGroupInternal(object name, CollectionViewGroupInternal parent) : base(name) { this.Parent = parent; }