static void Main(string[] args) { AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); if (args.Length != 2) { Usage(); return; } // %cd% - where you are calling from //string directory = Environment.CurrentDirectory; // (relative path and)command + args //string directory = Environment.CommandLine; //Where the executable lives. //string directory = System.AppDomain.CurrentDomain.BaseDirectory; //Console.Out.WriteLine("bo = \n{0}", directory+@"Logs\LogFile.txt"); string path = args[0]; Console.Out.WriteLine("Path: "+path); string pathOut = args[1]; AccountReader accountReader = new AccountReader(); PathAnalyst pathAnalyst = new PathAnalyst(path, accountReader); ConsoleReporter consoleReporter = new ConsoleReporter(); FilePersistor filePersistor = new FilePersistor(pathOut); SkbImporter skbImporter = new SkbImporter(pathAnalyst, consoleReporter, filePersistor); skbImporter.Execute(); }
private void ReportAllSkbLines(SkbRepository skbRepo, ConsoleReporter consoleReporter) { consoleReporter.WriteLine("\nSkbLines:"); consoleReporter.WriteLine("AccountName;Date;ActualAmount;Type;Reference;Desc"); skbRepo.GetAll().ForEach(resitem => consoleReporter.WriteLine("{0};{1};{2};{3};{4};{5}" , resitem.AccountName, resitem.Date, resitem.ActualAmount, resitem.Type, resitem.Reference, resitem.Desc)); }
static void Main(string[] args) { AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); if (args.Length != 2) { Usage(); return; } // %cd% - where you are calling from //string directory = Environment.CurrentDirectory; // (relative path and)command + args //string directory = Environment.CommandLine; //Where the executable lives. //string directory = System.AppDomain.CurrentDomain.BaseDirectory; //Console.Out.WriteLine("bo = \n{0}", directory+@"Logs\LogFile.txt"); string path = args[0]; Console.Out.WriteLine("Path: " + path); string pathOut = args[1]; AccountReader accountReader = new AccountReader(); PathAnalyst pathAnalyst = new PathAnalyst(path, accountReader); ConsoleReporter consoleReporter = new ConsoleReporter(); FilePersistor filePersistor = new FilePersistor(pathOut); SkbImporter skbImporter = new SkbImporter(pathAnalyst, consoleReporter, filePersistor); skbImporter.Execute(); }
public SkbImporter(PathAnalyst pathAnalyst, ConsoleReporter consoleReporter, FilePersistor filePersistor) { this.pathAnalyst = pathAnalyst; this.consoleReporter = consoleReporter; this.filePersistor = filePersistor; }