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 ParseAccounts() { hasNotParsedYet = false; accounts = new List <Account>(); System.IO.DirectoryInfo folder = new DirectoryInfo(path); foreach (var file in folder.GetFiles("*.csv")) { Account next = AccountReader.Read(file); accounts.Add(next); } }
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 PathAnalyst(string path, AccountReader accountReader) { this.path = path; this.accountReader = accountReader; }