示例#1
0
        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();
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }