File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ public bool IsRunning
4444 private set ;
4545 }
4646
47- private readonly object _timerSync = new object ( ) ;
47+ private readonly object _timerSync = new ( ) ;
4848 private Timer ? _cleanupTimer ;
4949
5050
@@ -95,9 +95,7 @@ public void SetCleanup(CleanupMode mode = CleanupMode.Deferred)
9595 // No past due action in order to prevent another thread from firing...
9696 LastCleanup = DateTime . MaxValue ;
9797 DeferCleanup ( ) ;
98- #pragma warning disable CA2008 // Last cleanup value protects against repeat task creation.
9998 Task . Factory . StartNew ( Cleanup ) ;
100- #pragma warning restore CA2008
10199 }
102100 }
103101 break ;
@@ -145,12 +143,10 @@ private void Cleanup(object? state)
145143 {
146144 OnCleanup ( ) ;
147145 }
148- #pragma warning disable CA1031 // Do not catch general exception types
149146 catch ( Exception ex )
150147 {
151148 Debug . WriteLine ( ex . ToString ( ) ) ;
152149 }
153- #pragma warning restore CA1031 // Do not catch general exception types
154150
155151 lock ( _timerSync )
156152 {
Original file line number Diff line number Diff line change 44 <TargetFrameworks >netstandard2.0;netstandard2.1</TargetFrameworks >
55 <LangVersion >latest</LangVersion >
66 <Nullable >enable</Nullable >
7+ <EnableNETAnalyzers >true</EnableNETAnalyzers >
78 <GeneratePackageOnBuild >True</GeneratePackageOnBuild >
89 <Authors >electricessence</Authors >
910 <Description >
You can’t perform that action at this time.
0 commit comments