private static void Main(string[] args) { if (args.Length > 0) { if (args[0] == "/i") { ManagedInstallerClass.InstallHelper(new string[] { Assembly.GetExecutingAssembly().Location }); } else if (args[0] == "/u") { ManagedInstallerClass.InstallHelper(new string[] { "/u", Assembly.GetExecutingAssembly().Location }); } } else { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; var wrapper = new WebAppWrapper().Start(); Console.WriteLine("Interceptor activated. Press a key to stop."); Console.ReadKey(); wrapper.Dispose(); } }
protected override void OnStart(string[] args) { _wrapper = new WebAppWrapper().Start(); }