public void FilesProcessing() { string[] fileNames = Directory.GetFiles(Constants.DataFilesFolder); var recordCollector = RecordCollector.GetInstance(); foreach (var fileName in fileNames) { using (container = new UnityContainer()) { var menuConfiguration = new MenuConfiguration(container); menuConfiguration.Configure(); var menu = container.Resolve <IMenu>(); var configurator = new ReportConfigurator(container, fileName, menu); configurator.Setup(); if (configurator.IsSuccesfulConfiguration) { var record = new OfficerProcessingRecord(); record.FileName = fileName; recordCollector.AddRecord(record); Run(); } } } recordCollector.WriteRecordList(); }
public void WriteLog([CallerMemberName] string callerName = null) { var record = new OfficerProcessingRecord(); record.RecordNum = dataAccess.GetCommonDbOfficers().ToList().Count(); record.FileNameCaller = callerName; record.FileNameRecordingTime = DateTime.Now.ToString(Constants.LogDateTimeFormat); var recordCollector = RecordCollector.GetInstance(); recordCollector.UpdateLastRecord(record); }
public void WriteLog([CallerMemberName] string callerName = null) { var record = new OfficerProcessingRecord(); record.Parser = this.dateParser.GetType().Name; record.ParserCaller = callerName; record.ParserRecordingTime = DateTime.Now.ToString(Constants.LogDateTimeFormat); var recordCollector = RecordCollector.GetInstance(); recordCollector.UpdateLastRecord(record); }
public void WriteLog([CallerMemberName] string callerName = null) { var record = new OfficerProcessingRecord(); record.OutputFormatter = outputFormatter.GetType().Name; record.ViewModelFormat = officerViewModelLoader.GetType().Name; record.ReportGenCaller = callerName; record.ReportGenRecordingTime = DateTime.Now.ToString(Constants.LogDateTimeFormat); var recordCollector = RecordCollector.GetInstance(); recordCollector.UpdateLastRecord(record); }