示例#1
0
        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();
        }
示例#2
0
 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));
 }
示例#3
0
        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();
        }
示例#4
0
 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));
 }
示例#5
0
 public SkbImporter(PathAnalyst pathAnalyst, ConsoleReporter consoleReporter, FilePersistor filePersistor)
 {
     this.pathAnalyst = pathAnalyst;
     this.consoleReporter = consoleReporter;
     this.filePersistor = filePersistor;
 }
示例#6
0
 public SkbImporter(PathAnalyst pathAnalyst, ConsoleReporter consoleReporter, FilePersistor filePersistor)
 {
     this.pathAnalyst     = pathAnalyst;
     this.consoleReporter = consoleReporter;
     this.filePersistor   = filePersistor;
 }