Exemple #1
0
        /// <summary>
        /// post-processor producer -> copy producer -> inputProducer.
        /// </summary>
        private IProducer <CloseableReference <CloseableImage> > GetPostprocessorSequence(

            IProducer <CloseableReference <CloseableImage> > inputProducer)
        {
            lock (_gate)
            {
                if (!_postprocessorSequences.ContainsKey(inputProducer))
                {
                    PostprocessorProducer postprocessorProducer =
                        _producerFactory.NewPostprocessorProducer(inputProducer);

                    PostprocessedBitmapMemoryCacheProducer postprocessedBitmapMemoryCacheProducer =
                        _producerFactory.NewPostprocessorBitmapMemoryCacheProducer(postprocessorProducer);

                    _postprocessorSequences.Add(inputProducer, postprocessedBitmapMemoryCacheProducer);
                }

                var producer = default(IProducer <CloseableReference <CloseableImage> >);
                _postprocessorSequences.TryGetValue(inputProducer, out producer);
                return(producer);
            }
        }