public static void Stop() { Log.Information("ServiceHelper Stop called"); ISettings s = Settings.LoadSettings(); CriticalProcessBase.SetProcessAsNotCritical(s); FirewallRule.AllowConnection(true); RegistryWrapper.StopRegistryMonitor(); RegistryWrapper.RestoreDefaultSettings(true); Log.Information("Closing WCF Host"); host?.Close(); if (host is null) { Log.Information("Host was null"); } if (host != null) { Log.Information("WCF Host status = " + host.State); } }
public static void Refresh() { Log.Information("ServiceHelper Refresh called"); RegistryWrapper.RestoreDefaultSettings(true); ISettings s = Settings.LoadSettings(); ForceDNSJob.End(); ForceDNSJob.Begin(s); }