private static void DnsKeeperJob_Elapsed(Object sender, ElapsedEventArgs e) { DnsKeeperTimer.Enabled = false; DnsWrapper.AddDnsRule(Dns); DnsKeeperTimer.Enabled = true; }
public static void End() { Log.Information("DnsKeeper Job Ending"); if (DnsKeeperTimer != null) { DnsKeeperTimer.Enabled = false; } DnsWrapper.RemoveDnsRule(); DnsKeeperTimer?.Stop(); DnsKeeperTimer?.Dispose(); DnsKeeperTimer?.Close(); }