コード例 #1
0
        private static void DnsKeeperJob_Elapsed(Object sender, ElapsedEventArgs e)
        {
            DnsKeeperTimer.Enabled = false;

            DnsWrapper.AddDnsRule(Dns);

            DnsKeeperTimer.Enabled = true;
        }
コード例 #2
0
        public static void End()
        {
            Log.Information("DnsKeeper Job Ending");

            if (DnsKeeperTimer != null)
            {
                DnsKeeperTimer.Enabled = false;
            }

            DnsWrapper.RemoveDnsRule();
            DnsKeeperTimer?.Stop();
            DnsKeeperTimer?.Dispose();
            DnsKeeperTimer?.Close();
        }