mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-04 05:35:49 +00:00
Add editorconfig, fix issues
This commit is contained in:
@@ -193,7 +193,7 @@ namespace ProtectionScan.Features
|
||||
/// <param name="protections">Dictionary of protections found, if any</param>
|
||||
private void WriteProtectionResults(string path, Dictionary<string, List<string>> protections)
|
||||
{
|
||||
if (protections == null)
|
||||
if (protections is null)
|
||||
{
|
||||
Console.WriteLine($"No protections found for {path}");
|
||||
return;
|
||||
@@ -250,7 +250,7 @@ namespace ProtectionScan.Features
|
||||
/// <param name="protections">Dictionary of protections found, if any</param>
|
||||
private void WriteProtectionResultJson(string path, Dictionary<string, List<string>> protections)
|
||||
{
|
||||
if (protections == null)
|
||||
if (protections is null)
|
||||
{
|
||||
Console.WriteLine($"No protections found for {path}");
|
||||
return;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace ProtectionScan
|
||||
var commandSet = CreateCommands(mainFeature);
|
||||
|
||||
// If we have no args, show the help and quit
|
||||
if (args == null || args.Length == 0)
|
||||
if (args is null || args.Length == 0)
|
||||
{
|
||||
commandSet.OutputAllHelp();
|
||||
return;
|
||||
|
||||
@@ -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.)
|
||||
|
||||
Reference in New Issue
Block a user