Пример #1
0
 protected BitmapProvider()
 {
     nextFrame   = new AutoResetEvent(false);
     collector   = new BlobCollector();
     recognizer  = new ContactRecognizer();
     filters     = new FilterPipe();
     sectionName = string.Format("filtersSection-{0}", Id);
 }
Пример #2
0
        public IPipe <TContext> Build()
        {
            if (_filters.Count == 0)
            {
                return(Pipe.Empty <TContext>());
            }

            IPipe <TContext> current = new LastPipe <TContext>(_filters[_filters.Count - 1]);

            for (var i = _filters.Count - 2; i >= 0; i--)
            {
                current = new FilterPipe <TContext>(_filters[i], current);
            }

            return(current);
        }
Пример #3
0
        static IPipe <TOutput> BuildOutputPipe(IFilter <TOutput>[] filters)
        {
            if (filters.Length == 0)
            {
                throw new ArgumentException("There must be at least one filter, the output filter, for the output pipe");
            }

            IPipe <TOutput> current = new LastPipe <TOutput>(filters[filters.Length - 1]);

            for (var i = filters.Length - 2; i >= 0; i--)
            {
                current = new FilterPipe <TOutput>(filters[i], current);
            }

            return(current);
        }
Пример #4
0
        static IPipe <ConsumeContext <TMessage> > BuildOutputPipe(IFilter <ConsumeContext <TMessage> >[] filters)
        {
            if (filters.Length == 0)
            {
                throw new ArgumentException("There must be at least one filter, the output filter, for the output pipe");
            }

            IPipe <ConsumeContext <TMessage> > current = new LastPipe <ConsumeContext <TMessage> >(filters[filters.Length - 1]);

            for (int i = filters.Length - 2; i >= 0; i--)
            {
                current = new FilterPipe <ConsumeContext <TMessage> >(filters[i], current);
            }

            return(current);
        }
Пример #5
0
        public IPipe <TContext> Build(IPipe <TContext> lastPipe)
        {
            if (_filters.Count == 0)
            {
                return(lastPipe);
            }

            IPipe <TContext> current = lastPipe;

            for (var i = _filters.Count - 1; i >= 0; i--)
            {
                current = new FilterPipe <TContext>(_filters[i], current);
            }

            return(current);
        }
Пример #6
0
        public LogWindow.LogWindow AddFilterTab(FilterPipe pipe, string title, ILogLineColumnizer preProcessColumnizer)
        {
            LogWindow.LogWindow logWin = AddFileTab(pipe.FileName, true, title, false, preProcessColumnizer);
            if (pipe.FilterParams.searchText.Length > 0)
            {
                ToolTip tip = new ToolTip(components);
                tip.SetToolTip(logWin,
                               "Filter: \"" + pipe.FilterParams.searchText + "\"" +
                               (pipe.FilterParams.isInvert ? " (Invert match)" : "") +
                               (pipe.FilterParams.columnRestrict ? "\nColumn restrict" : "")
                               );
                tip.AutomaticDelay = 10;
                tip.AutoPopDelay   = 5000;
                LogWindowData data = logWin.Tag as LogWindowData;
                data.toolTip = tip;
            }

            return(logWin);
        }
Пример #7
0
 public RestAPI Filter(FilterPipe filter)
 {
     return this.Add(filter);
 }
Пример #8
0
 public GermlinPipe Filter(string property, FilterPipe filter)
 {
     return(this.Add(new PropertyPipe(property, filter)));
 }
Пример #9
0
 public GermlinPipe Filter(string property, FilterPipe filter)
 {
     return this.Add(new PropertyPipe(property, filter));
 }
Пример #10
0
 public RestAPI Filter(FilterPipe filter)
 {
     return(this.Add(filter));
 }