Ejemplo n.º 1
0
        public IHaveToken <T> Exists(IDiagInfo diagInfo)
        {
            var info       = new FilterInfo(store.NextId, diagInfo, groupToken, priority);
            var dependency = new CollectionDependency(token);
            var filterReg  = new FilterRegistration(() => new ExistsFilter(dependency, info));

            store.RegisterCvFilter(filterReg, info.FilterToken);
            store.RegisterProvider(provider, token);
            return(new HaveToken <T>(token));
        }
Ejemplo n.º 2
0
        internal IHaveToken <T> CreateDefinition(Func <IEnumerable <IResolutionContext>, bool> filterFunc,
                                                 IDiagInfo diagInfo)
        {
            var dependency = new CollectionDependency(token);
            var info       = new FilterInfo(store.NextId, diagInfo, groupToken, priority);
            var filterReg  = new FilterRegistration(() => new Filter1 <IEnumerable <IResolutionContext> >(dependency, filterFunc, info));

            store.RegisterCvFilter(filterReg, info.FilterToken);
            provider.IsNegative = true;
            store.RegisterProvider(provider, token);
            return(new HaveToken <T>(token));
        }
Ejemplo n.º 3
0
 private static IFilter CreateExistsFilter(INode node, IFilterGroup filterGroup)
 {
     var dependency = new CollectionDependency(node.Token);
     return new ExistsFilter(dependency, filterGroup.FilterInfo);
 }
Ejemplo n.º 4
0
        private static IFilter CreateExistsFilter(INode node, IFilterGroup filterGroup)
        {
            var dependency = new CollectionDependency(node.Token);

            return(new ExistsFilter(dependency, filterGroup.FilterInfo));
        }