Beispiel #1
0
 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));
 }
Beispiel #2
0
        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();
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
 public MonoProcess(ExecuteMessage msg, MonoDebugServer server, ClientSession session)
 {
     Message = msg; Server = server; Session = session; Cancel = new CancellationTokenSource();
 }
Beispiel #5
0
 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;
 }