public static MonoProcess Start(ExecuteMessage msg, MonoDebugServer server, ClientSession session) { if (msg.ApplicationType == ApplicationTypes.WebApplication) { return(new MonoWebProcess(msg, server, session)); } return(new MonoDesktopProcess(msg, server, session)); }
private void StartMono(ExecuteMessage msg) { MonoDebugServer.Current.SuspendKeyInput(); msg.WorkingDirectory = string.IsNullOrEmpty(msg.WorkingDirectory) ? msg.RootPath : msg.WorkingDirectory; MonoProcess proc = MonoProcess.Start(msg, Server, this); proc.ProcessStarted += MonoProcessStarted; proc.Output = SendOutput; process = proc.Start(); process.Exited += MonoExited; logger.Trace($"{proc.GetType().Name} started: {proc.process.StartInfo.FileName} {proc.process.StartInfo.Arguments}"); SendStarted(); }
private void StartExecuting(ExecuteMessage msg) { if (!Directory.Exists(msg.RootPath)) { Directory.CreateDirectory(msg.RootPath); } logger.Trace("Extracted content to {1}", remoteEndpoint, msg.RootPath); if (!msg.HasMdbs) { var generator = new Pdb2MdbGenerator(); string binaryDirectory = msg.ApplicationType == ApplicationTypes.WebApplication ? Path.Combine(msg.RootPath, "bin") : msg.RootPath; generator.GeneratePdb2Mdb(binaryDirectory); } StartMono(msg); }
public MonoProcess(ExecuteMessage msg, MonoDebugServer server, ClientSession session) { Message = msg; Server = server; Session = session; Cancel = new CancellationTokenSource(); }
public MonoDesktopProcess(ExecuteMessage msg, MonoDebugServer server, ClientSession session) : base(msg, server, session) { RedirectOutput = msg.ApplicationType == ApplicationTypes.WindowsApplication; }
public MonoWebProcess(ExecuteMessage msg, MonoDebugServer server, ClientSession session) : base(msg, server, session) { RedirectOutput = true; }