Example #1
0
        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);
            }
        }