Пример #1
0
        public EntityListBase <TOutPut> ProxyAs <TOutPut>(EntityListBase <TOutPut> entityListBase, Converter <T, TOutPut> converter)
        {
            entityListBase = ConvertAll <TOutPut>(entityListBase, converter);
            entityListBase.EntityListBaseChanged += new EntityListBase <TOutPut> .EntityListBaseChangedEventHandler(EntityListBaseOutput_EntityListBaseChanged);

            this.EntityListBaseChanged += new EntityListBaseChangedEventHandler(entityListBase.EntityListBaseOutput_EntityListBaseChanged);
            return(entityListBase);
        }
Пример #2
0
        public EntityListBase <T> ProxyAs(EntityListBase <T> entityListBase)
        {
            for (int num1 = 0; num1 < this.Count; num1++)
            {
                entityListBase.Add(this[num1]);
            }
            entityListBase.EntityListBaseChanged += new EntityListBase <T> .EntityListBaseChangedEventHandler(EntityListBaseOutput_EntityListBaseChanged);

            return(entityListBase);
        }
Пример #3
0
 public EntityListBase <T> FindAll(EntityListBase <T> entityListBase, object criteria, PredicateWithCriteria <T, object> match)
 {
     if (match == null)
     {
         throw new System.ArgumentNullException();
     }
     for (int num1 = 0; num1 < this.Count; num1++)
     {
         if (match(this.Items[num1], criteria))
         {
             entityListBase.Add(this.Items[num1]);
         }
     }
     return(entityListBase);
 }
Пример #4
0
 protected EntityListBase <T> FindAll(EntityListBase <T> entityListBase, Predicate <T> match)
 {
     if (match == null)
     {
         //ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
         throw new System.ArgumentNullException();
     }
     for (int num1 = 0; num1 < this.Count; num1++)
     {
         if (match(this.Items[num1]))
         {
             entityListBase.Add(this.Items[num1]);
         }
     }
     return(entityListBase);
 }
Пример #5
0
 public EntityListBase <TOutput> ConvertAll <TOutput>(EntityListBase <TOutput> entityListBase, Converter <T, TOutput> converter, bool suspendListChangedEvent)
 {
     if (converter == null)
     {
         throw new ArgumentNullException();
     }
     for (int num1 = 0; num1 < this.Count; num1++)
     {
         if (suspendListChangedEvent)
         {
             entityListBase.Load(converter(this[num1]));
         }
         else
         {
             entityListBase.Add(converter(this[num1]));
         }
     }
     if (suspendListChangedEvent)
     {
         entityListBase.OnRangeLoaded();
     }
     return(entityListBase);
 }
Пример #6
0
 public EntityListBase <TOutput> ConvertAll <TOutput>(EntityListBase <TOutput> entityListBase, Converter <T, TOutput> converter)
 {
     return(ConvertAll(entityListBase, converter, false));
 }