mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 11:42:22 +08:00
WPF: Change NetworkChangeDetector to static class
This commit is contained in:
parent
7dbcbb4069
commit
7c2e2e0ee5
|
@ -10,10 +10,10 @@ using Serilog;
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace BililiveRecorder.WPF
|
namespace BililiveRecorder.WPF
|
||||||
{
|
{
|
||||||
internal abstract class NetworkChangeDetector
|
internal static class NetworkChangeDetector
|
||||||
{
|
{
|
||||||
private static bool enabled = false;
|
private static bool enabled = false;
|
||||||
private static readonly ILogger logger = Log.ForContext<NetworkChangeDetector>();
|
private static readonly ILogger logger = Log.ForContext(typeof(NetworkChangeDetector));
|
||||||
|
|
||||||
private static readonly object debounceLock = new();
|
private static readonly object debounceLock = new();
|
||||||
private static readonly TimeSpan debounceDelay = TimeSpan.FromSeconds(15);
|
private static readonly TimeSpan debounceDelay = TimeSpan.FromSeconds(15);
|
||||||
|
@ -49,7 +49,6 @@ namespace BililiveRecorder.WPF
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
LogNetworkInfoWithoutDebounce();
|
LogNetworkInfoWithoutDebounce();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user