Esempio n. 1
0
        private static int Main(string[] args)
        {
            var body = string.Empty;

            body = "This is an auto generated mail \r\n\r\n";
            body = ("Test case summary : \r\n");
            try
            {
                _shellViewModel = new Trx2AnyViewModel();
                // For each .trx file in the given folder process it
                foreach (string s in args)
                {
                    if (s.StartsWith("/i:"))
                    {
                        _shellViewModel.ParsedFilePath = s.Remove(0, 3);
                    }
                    else if (s.StartsWith("/o:"))
                    {
                        _shellViewModel.OutputFilePath = s.Remove(0, 3);
                    }
                    else if (s.StartsWith("/mail"))
                    {
                        _shellViewModel.IsSendMail = true;
                    }
                    else if (s.StartsWith("/p:"))
                    {
                        _shellViewModel.ParsableFormat = s.Remove(0, 3);
                    }
                    else if (s.StartsWith("/e:"))
                    {
                        _shellViewModel.ExportableFormat = s.Remove(0, 3);
                    }
                    else
                    {
                        throw new Exception("invalid switch " + s);
                    }
                }

                var bootStrapper = new MEFBootstrapper(_shellViewModel);
                var exitCode     = bootStrapper.Run();
                System.Diagnostics.Debug.WriteLine(exitCode);
                return((int)exitCode);
            }
            catch (Exception ex)
            {
                var exceptionManager = new ExceptionManager();
                exceptionManager.HandleException(ex);
                return((int)ExitCode.Failure);
            }
        }
Esempio n. 2
0
        private static int Main(string[] args)
        {
            var body = string.Empty;
            body = "This is an auto generated mail \r\n\r\n";
            body = ("Test case summary : \r\n");
            try
            {
                _shellViewModel = new Trx2AnyViewModel();
                // For each .trx file in the given folder process it
                foreach (string s in args)
                {
                    if (s.StartsWith("/i:"))
                    {
                        _shellViewModel.ParsedFilePath = s.Remove(0, 3);
                    }
                    else if (s.StartsWith("/o:"))
                    {
                        _shellViewModel.OutputFilePath = s.Remove(0, 3);
                    }
                    else if (s.StartsWith("/mail"))
                    {
                        _shellViewModel.IsSendMail = true;
                    }
                    else if (s.StartsWith("/p:"))
                    {
                        _shellViewModel.ParsableFormat = s.Remove(0, 3);
                    }
                    else if (s.StartsWith("/e:"))
                    {
                        _shellViewModel.ExportableFormat = s.Remove(0, 3);
                    }
                    else
                    {
                        throw new Exception("invalid switch " + s);
                    }
                }

                var bootStrapper = new MEFBootstrapper(_shellViewModel);
                var exitCode = bootStrapper.Run();
                System.Diagnostics.Debug.WriteLine(exitCode);
                return (int) exitCode;
            }
            catch (Exception ex)
            {
                var exceptionManager = new ExceptionManager();
                exceptionManager.HandleException(ex);
                return (int) ExitCode.Failure;
            }
        }
Esempio n. 3
0
 public Trx2Any([Import("ExceptionManager")] IExceptionManager exceptionManager, [Import("Trx2AnyViewModel")] ITrx2AnyViewModel viewModel)
 {
     _exceptionManager = exceptionManager;
     _viewModel        = viewModel;
 }
Esempio n. 4
0
 public MEFBootstrapper(ITrx2AnyViewModel shellViewModel)
 {
     _shellViewModel = shellViewModel;
 }
Esempio n. 5
0
 public MEFBootstrapper(ITrx2AnyViewModel shellViewModel)
 {
     _shellViewModel = shellViewModel;
 }
Esempio n. 6
0
 public Trx2Any([Import("ExceptionManager")]IExceptionManager exceptionManager, [Import("Trx2AnyViewModel")]ITrx2AnyViewModel viewModel)
 {
     _exceptionManager = exceptionManager;
     _viewModel = viewModel;
 }