예제 #1
0
 internal CollectionView(IEnumerable <T> source,
                         IEnumerable <Predicate <T> > filters,
                         IEqualityComparer <T> itemComparer,
                         Func <IEnumerable <T>, IEnumerable <T> > orderingFunction,
                         SyncParameters <T> syncParameters)
     : base(source)
 {
     this.source           = source.ToList();
     this.Filters          = filters;
     this.ItemComparer     = itemComparer;
     this.OrderingFunction = orderingFunction;
     this.SyncParameters   = syncParameters;
 }
        public static ICollectionView <T> Create <T>(IEnumerable <T> source, IEnumerable <Predicate <T> > filters, Func <T, T, bool> comparerFunction, Func <IEnumerable <T>, IEnumerable <T> > orderingFunction, SyncParameters <T> syncParameters)
        {
            var functionComparer = new FunctionComparer <T>(comparerFunction);

            return(new CollectionView <T>(source, filters, functionComparer, orderingFunction, syncParameters));
        }