mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-20 04:48:53 +00:00
36 lines
949 B
C#
36 lines
949 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading;
|
|
|
|
namespace Cosmos.Launch.Common {
|
|
public abstract class DebugHost {
|
|
protected string[] mArgs;
|
|
|
|
public DebugHost(string[] aArgs, int aMinArgCount) {
|
|
if (aArgs.Length < aMinArgCount) {
|
|
throw new Exception("Not enough arguments.");
|
|
}
|
|
mArgs = aArgs;
|
|
}
|
|
|
|
public int Go(string aEdition) {
|
|
try {
|
|
Console.WriteLine("Cosmos Visual Studio Debug Host for " + aEdition);
|
|
Console.WriteLine("Waiting for start signal.");
|
|
|
|
// This is here to allow this process to start, but pause till the caller tells it to continue.
|
|
Console.ReadLine();
|
|
|
|
return Run();
|
|
} catch (Exception ex) {
|
|
Console.WriteLine(ex.Message);
|
|
Thread.Sleep(2000);
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
protected abstract int Run();
|
|
}
|
|
}
|