public FixerIOCurrenciesFetcher(ServicesSettingsManager settingsManager)
        {
            var settings = settingsManager["fixerio"];

            if (settings == ServiceSettings.Empty)
            {
                throw new FixerIOSettingsNotFound();
            }

            mClient = new RestClient(settings.ConnectionString);
        }
예제 #2
0
        private static void BootstrapIoCContainer()
        {
            var container = new IoCContainer();

            container.SetLogger(mLogger);
            Injection.RegisterInjectionProvider(container);

            mFinalizer = new Finalizer((package, ctx) =>
            {
                mMaxValue = ctx.FinalUnitContext.GetUnit <double>();
                return(true);
            });
            container.RegisterSingle(mFinalizer);

            var servicesSettings = new ServicesSettingsManager(
                JObject.Parse(File.ReadAllText("./settings.json"))["services"]
                .ToObject <Dictionary <string, ServiceSettings> >());

            container.RegisterSingle(servicesSettings);
        }