예제 #1
0
        static void Main(string[] args)
        {
            DependencyManager.BootstrapForSystem("Console", new DatabaseSettings());

            var interactor = MasterFactory.GetCitiFileImportInteractor();

            var requestModel = new CitiFileImportRequestModel(args);

            interactor.ImportFiles(requestModel);
        }
        public void ImportFiles(CitiFileImportRequestModel requestModel)
        {
            _citiReturnSeriesImporter.DeleteAllReturns();

            var files = requestModel.GetFiles();

            foreach (var file in files)
            {
                _citiReturnSeriesImporter.ImportMonthlyReturnsFile(file);
            }
        }
예제 #3
0
        static void Main(string[] args)
        {
            var builder = new ConfigurationBuilder()
                          .SetBasePath(Directory.GetCurrentDirectory())
                          .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);

            IConfigurationRoot configuration = builder.Build();

            var serviceLocator = new ServiceLocatorForConsoleRunner(configuration);

            var citiFileImportInteractor = serviceLocator.GetService <CitiFileImportInteractor>();

            var citiFileImportRequestModel = new CitiFileImportRequestModel(args);

            citiFileImportInteractor.ImportFiles(citiFileImportRequestModel);
        }
        private CitiFileImportRequestModel CreateValidRequestModel()
        {
            var requestModel = new CitiFileImportRequestModel(new[] { "file000", "file001" });

            return(requestModel);
        }