mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-01 05:13:40 +01:00
Fix IDE0270: Null check can be simplified
This commit is contained in:
parent
58aeb11268
commit
a19094f4f3
8 changed files with 10 additions and 35 deletions
|
|
@ -141,10 +141,7 @@ internal class PluginErrorHandler : IServiceType
|
|||
private static Action<TDelegate, object[]> CreateInvoker<TDelegate>() where TDelegate : Delegate
|
||||
{
|
||||
var delegateType = typeof(TDelegate);
|
||||
var method = delegateType.GetMethod("Invoke");
|
||||
if (method == null)
|
||||
throw new InvalidOperationException($"Delegate {delegateType} does not have an Invoke method.");
|
||||
|
||||
var method = delegateType.GetMethod("Invoke") ?? throw new InvalidOperationException($"Delegate {delegateType} does not have an Invoke method.");
|
||||
var parameters = method.GetParameters();
|
||||
|
||||
// Create parameters for the lambda
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue