context menu image awaits

This commit is contained in:
pointfeev 2022-03-08 20:42:29 -05:00
parent 1815f1087d
commit 99c9fcb66d
2 changed files with 3 additions and 8 deletions

View file

@ -62,7 +62,7 @@ internal class ContextMenuItem : ToolStripMenuItem
item.Image = image;
}
}
});
}).ConfigureAwait(false);
private static async Task TryImageIdentifierInfo(ContextMenuItem item, (string id, string iconUrl, bool sub) imageIdentifierInfo, Action onFail = null) => await Task.Run(async () =>
{
@ -80,7 +80,7 @@ internal class ContextMenuItem : ToolStripMenuItem
else if (onFail is not null)
onFail();
}
});
}).ConfigureAwait(false);
private readonly EventHandler OnClickEvent;
protected override void OnClick(EventArgs e)

View file

@ -1,9 +1,4 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("CodeQuality", "IDE0076:Invalid global 'SuppressMessageAttribute'")]
[assembly: SuppressMessage("CodeQuality", "IDE0079:Remove unnecessary suppression")]