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); } }
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; } }
public Trx2Any([Import("ExceptionManager")] IExceptionManager exceptionManager, [Import("Trx2AnyViewModel")] ITrx2AnyViewModel viewModel) { _exceptionManager = exceptionManager; _viewModel = viewModel; }
public MEFBootstrapper(ITrx2AnyViewModel shellViewModel) { _shellViewModel = shellViewModel; }
public Trx2Any([Import("ExceptionManager")]IExceptionManager exceptionManager, [Import("Trx2AnyViewModel")]ITrx2AnyViewModel viewModel) { _exceptionManager = exceptionManager; _viewModel = viewModel; }