コード例 #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();
        }
コード例 #2
0
 public NationalBankCurrencyProvider(ICurrencyImporter importer)
 {
     _iCurrencyImporter = importer;
 }