Skip to content

Commit

Permalink
Fix warnings for single instance handling
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwille committed Jun 2, 2024
1 parent 3304d6b commit 13418aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ILSpy/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ public App()
}
}

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)
Expand Down
2 changes: 1 addition & 1 deletion ILSpy/AppEnv/CommandLineArguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public static CommandLineArguments Create(IEnumerable<string> arguments)
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
}
Expand Down
2 changes: 2 additions & 0 deletions ILSpy/AppEnv/SingleInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//2008-01-03: Added Resources
//2007-12-29: New version

#nullable enable

namespace Medo.Application;

using System;
Expand Down

0 comments on commit 13418aa

Please sign in to comment.