Beispiel #1
0
 public static bool GetFactory(short key, out IDecoderFactory decoderFactory)
 {
     if (_factorys.TryGetValue(key, out IDecoderFactory factory))
     {
         decoderFactory = factory;
         return(true);
     }
     else
     {
         decoderFactory = null;
         return(false);
     }
 }
Beispiel #2
0
        public HttpClient(IContainerConfiguration containerConfiguration)
        {
            var registry = containerConfiguration.InitializeContainer();

            ObjectFactory.Initialize(x => x.AddRegistry(registry));

            _encoder = ObjectFactory.GetInstance<IEncoder>();
            _decoderFactory = ObjectFactory.GetInstance<IDecoderFactory>();

            Request = new HttpRequest(_encoder);
        }
 public DecompressionPresenter(IFileWrapper fileWrapper, IDecoderFactory decoderFactory)
 {
     this.fileWrapper = fileWrapper;
     this.decoderFactory = decoderFactory;
 }
Beispiel #4
0
 public static void RegisterFactory(short key, IDecoderFactory onlinePackageFactory)
 {
     _factorys.TryAdd(key, onlinePackageFactory);
 }