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); } }
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; }
public static void RegisterFactory(short key, IDecoderFactory onlinePackageFactory) { _factorys.TryAdd(key, onlinePackageFactory); }