Add editorconfig, fix issues

This commit is contained in:
Matt Nadareski
2026-01-25 17:27:42 -05:00
parent 7058c7a150
commit 0d2f81773d
84 changed files with 407 additions and 244 deletions

View File

@@ -36,7 +36,7 @@ namespace ProtectionScan
// Capture the current synchronization context.
// If there is no current context, we use a default instance targeting the ThreadPool.
_synchronizationContext = SynchronizationContext.Current ?? ProgressStatics.DefaultContext;
Debug.Assert(_synchronizationContext != null);
Debug.Assert(_synchronizationContext is not null);
_invokeHandlers = new SendOrPostCallback(InvokeHandlers);
}
@@ -70,7 +70,7 @@ namespace ProtectionScan
// an event handler is removed between now and then.
Action<T>? handler = _handler;
EventHandler<T>? changedEvent = ProgressChanged;
if (handler != null || changedEvent != null)
if (handler is not null || changedEvent is not null)
{
// Post the processing to the sync context.
// (If T is a value type, it will get boxed here.)