示例#1
0
        /// <summary>
        /// Bitmap cache get -> thread hand off -> multiplex -> bitmap cache.
        /// </summary>
        /// <param name="inputProducer">
        /// Producer providing the input to the bitmap cache.
        /// </param>
        /// <returns>
        /// Bitmap cache get to bitmap cache sequence.
        /// </returns>
        private IProducer <CloseableReference <CloseableImage> > NewBitmapCacheGetToBitmapCacheSequence(
            IProducer <CloseableReference <CloseableImage> > inputProducer)
        {
            BitmapMemoryCacheProducer bitmapMemoryCacheProducer =
                _producerFactory.NewBitmapMemoryCacheProducer(inputProducer);

            BitmapMemoryCacheKeyMultiplexProducer bitmapKeyMultiplexProducer =
                _producerFactory.NewBitmapMemoryCacheKeyMultiplexProducer(bitmapMemoryCacheProducer);

            ThreadHandoffProducer <CloseableReference <CloseableImage> > threadHandoffProducer =
                _producerFactory.NewBackgroundThreadHandoffProducer(
                    bitmapKeyMultiplexProducer,
                    _threadHandoffProducerQueue);

            return(_producerFactory.NewBitmapMemoryCacheGetProducer(threadHandoffProducer));
        }