Пример #1
0
        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);
            }
        }
Пример #2
0
 IEnumerator IEnumerable.GetEnumerator() => RealObject
 .OfType <TNew>()
 .GetEnumerator();
Пример #3
0
 public virtual IEnumerator <TNew> GetEnumerator() => RealObject
 .OfType <TNew>()
 .GetEnumerator();
Пример #4
0
 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());
 }