public virtual void Clear() { // Only clear items of this type // that match the predicate. var items = RealObject .OfType <TNew>() .ToArray(); foreach (var item in items) { RealObject.Remove(item); } }
IEnumerator IEnumerable.GetEnumerator() => RealObject .OfType <TNew>() .GetEnumerator();
public virtual IEnumerator <TNew> GetEnumerator() => RealObject .OfType <TNew>() .GetEnumerator();
public virtual int CountOf(TGroup group) => RealObject.OfType <TGroup>().Count();
public virtual int CountOf(TGroup group) { return(RealObject.OfType <TGroup>().Count()); }
IEnumerator IEnumerable.GetEnumerator() { return(RealObject .OfType <TNew>() .GetEnumerator()); }
public virtual IEnumerator <TNew> GetEnumerator() { return(RealObject .OfType <TNew>() .GetEnumerator()); }