Ejemplo n.º 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));
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
 public MonoProcess(ExecuteMessage msg, MonoDebugServer server, ClientSession session)
 {
     Message = msg; Server = server; Session = session; Cancel = new CancellationTokenSource();
 }
Ejemplo n.º 5
0
 public MonoDesktopProcess(ExecuteMessage msg, MonoDebugServer server, ClientSession session) : base(msg, server, session)
 {
     RedirectOutput = msg.ApplicationType == ApplicationTypes.WindowsApplication;
 }
Ejemplo n.º 6
0
 public MonoWebProcess(ExecuteMessage msg, MonoDebugServer server, ClientSession session) : base(msg, server, session)
 {
     RedirectOutput = true;
 }