Пример #1
0
            public KeyOutputPipe(FilterObservable observers, IPipeContextConverter<TInput, TOutput> contextConverter, KeyAccessor<TInput, TKey> keyAccessor)
                : base(observers, contextConverter)
            {
                _keyAccessor = keyAccessor;

                _filter = new Lazy<IOutputPipeFilter<TInput, TOutput, TKey>>(CreateKeyFilter);
            }
Пример #2
0
            public OutputFilter(FilterObservable observers, IPipeContextConverter <TInput, TOutput> contextConverter)
            {
                ContextConverter = contextConverter;
                Observers        = observers;

                Filter = new OutputPipeFilter <TInput, TOutput>(ContextConverter, Observers, new TeeFilter <TOutput>());
            }
Пример #3
0
            public OutputPipe(FilterObservable observers, IPipeContextConverter<TInput, TOutput> contextConverter)
            {
                _filter = new Lazy<IOutputPipeFilter<TInput, TOutput>>(CreateFilter);
                ContextConverter = contextConverter;
                Observers = observers;

                PipeFilters = new List<IFilter<TOutput>>();
            }
Пример #4
0
        public OutputPipeFilter(IPipeContextConverter <TInput, TOutput> contextConverter, FilterObservable observers, ITeeFilter <TOutput> outputFilter)
        {
            _outerObservers   = observers;
            _contextConverter = contextConverter;

            _output = outputFilter;

            _observers = new FilterObservable <TOutput>();
        }
Пример #5
0
        public DynamicFilter(IPipeContextConverterFactory <TInput> converterFactory)
        {
            ConverterFactory = converterFactory;

            _outputPipes     = new Dictionary <Type, IOutputPipe>();
            _outputPipeArray = _outputPipes.Values.ToArray();

            Observers = new FilterObservable();
        }
Пример #6
0
        public DynamicFilter(IPipeContextConverterFactory <TInput> converterFactory)
        {
            ConverterFactory = converterFactory;

            _outputPipes     = new Dictionary <Type, IOutputFilter>();
            _outputPipeArray = new IOutputFilter[0];

            Observers = new FilterObservable();
            _empty    = Pipe.Empty <TInput>();
        }
Пример #7
0
        public OutputPipeFilter(IEnumerable <IFilter <TOutput> > filters, IPipeContextConverter <TInput, TOutput> contextConverter,
                                ITeeFilter <TOutput> outputFilter)
        {
            _contextConverter = contextConverter;

            _output = outputFilter;

            _outputPipe = BuildOutputPipe(filters.Concat(Enumerable.Repeat(_output, 1)).ToArray());

            _observers = new FilterObservable <TOutput>();
        }
Пример #8
0
 public DynamicFilter(IPipeContextConverterFactory<TInput> converterFactory)
 {
     ConverterFactory = converterFactory;
     OutputPipes = new ConcurrentDictionary<Type, IOutputPipe>();
     Observers = new FilterObservable();
 }
Пример #9
0
 public KeyOutputFilter(FilterObservable observers, IPipeContextConverter <TInput, TOutput> contextConverter, KeyAccessor <TInput, TKey> keyAccessor)
     : base(observers, contextConverter)
 {
     Filter = new OutputPipeFilter <TInput, TOutput, TKey>(ContextConverter, Observers, keyAccessor);
 }
Пример #10
0
 public KeyOutputFilter(FilterObservable observers, IPipeContextConverter <TInput, TOutput> contextConverter, KeyAccessor <TInput, TKey> keyAccessor)
     : base(observers, contextConverter)
 {
     _keyAccessor = keyAccessor;
 }
Пример #11
0
 public OutputFilter(FilterObservable observers, IPipeContextConverter <TInput, TOutput> contextConverter)
 {
     ContextConverter = contextConverter;
     Observers        = observers;
 }