Beispiel #1
0
        /// <summary>
        /// multiplex -> encoded cache -> disk cache -> (webp transcode) ->
        /// network fetch.
        /// </summary>
        private IProducer <EncodedImage> GetCommonNetworkFetchToEncodedMemorySequence()
        {
            lock (_gate)
            {
                if (_commonNetworkFetchToEncodedMemorySequence == null)
                {
                    IProducer <EncodedImage> inputProducer =
                        NewEncodedCacheMultiplexToTranscodeSequence(
                            _producerFactory.NewNetworkFetchProducer(_networkFetcher));

                    _commonNetworkFetchToEncodedMemorySequence =
                        ProducerFactory.NewAddImageTransformMetaDataProducer(inputProducer);

                    if (_resizeAndRotateEnabledForNetwork && !_downsampleEnabled)
                    {
                        _commonNetworkFetchToEncodedMemorySequence =
                            _producerFactory.NewResizeAndRotateProducer(
                                _commonNetworkFetchToEncodedMemorySequence);
                    }
                }

                return(_commonNetworkFetchToEncodedMemorySequence);
            }
        }