Browse Source

Fix warnings for single instance handling

pull/3217/head
Christoph Wille 1 year ago
parent
commit
13418aa00a
  1. 4
      ILSpy/App.xaml.cs
  2. 2
      ILSpy/AppEnv/CommandLineArguments.cs
  3. 2
      ILSpy/AppEnv/SingleInstance.cs

4
ILSpy/App.xaml.cs

@ -104,9 +104,11 @@ namespace ICSharpCode.ILSpy @@ -104,9 +104,11 @@ namespace ICSharpCode.ILSpy
}
}
private static void SingleInstance_NewInstanceDetected(object? sender, NewInstanceEventArgs e)
private static void SingleInstance_NewInstanceDetected(object sender, NewInstanceEventArgs e)
{
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
ICSharpCode.ILSpy.MainWindow.Instance.HandleSingleInstanceCommandLineArguments(e.Args);
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
}
static Assembly ResolvePluginDependencies(AssemblyLoadContext context, AssemblyName assemblyName)

2
ILSpy/AppEnv/CommandLineArguments.cs

@ -108,7 +108,7 @@ namespace ICSharpCode.ILSpy.AppEnv @@ -108,7 +108,7 @@ namespace ICSharpCode.ILSpy.AppEnv
instance.AssembliesToLoad.Add(assembly);
}
}
catch (Exception ex)
catch (Exception)
{
// Intentionally ignore exceptions if any, this is only added to always have an exception-free startup
}

2
ILSpy/AppEnv/SingleInstance.cs

@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
//2008-01-03: Added Resources
//2007-12-29: New version
#nullable enable
namespace Medo.Application;
using System;

Loading…
Cancel
Save