Exemplo n.º 1
0
        public CurrencyXplorer(IApplicationEnvironment appEnv) : this()
        {
            //Configuration = Utils.CreateConfiguration(appEnv, "config.json");

            // Entry point for dependency injection.

            _iCurrencyImporter = new JsonCurrencyImporter();
            //_iCurrencyImporter = new LocalJsonCurrencyImporter(); ;

            _iCurrencyProvider = new NationalBankCurrencyProvider(_iCurrencyImporter);

            _currencyDataContext = new CurrencyDataContext(Configuration["Data:DefaultConnection:ConnectionString"]);
            _iCurrencyRepository = new MsSqlExplorerRepository(_currencyDataContext);

            _iCachingProcessor = new ApiDatabaseCachingProcessor(_iCurrencyProvider, _iCurrencyRepository);

            _iUserSettingsHolder = new UserSettingsHolder(_iCurrencyRepository);

            _dataPresenter = new DataPresenter();
            //_dataHolder = new DataHolder(_iCachingProcessor, _iUserSettingsHolder, Configuration);
            _dataProcessor = new DataProcessor(_iCachingProcessor);

            _allCurrencyCodes = GetAllCurrencyCodes();
        }
Exemplo n.º 2
0
 public DataHolder(ICachingProcessor cachingProcessor, IUserSettingsHolder userSettingsHolder, IConfiguration configuration)
 {
     CachingProcessor   = cachingProcessor;
     UserSettingsHolder = userSettingsHolder;
     Configuration      = configuration;
 }