mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 20:33:40 +01:00
Use EnumerateInvocationList instead of GetInvocationList (#2303)
This commit is contained in:
parent
13306e24ba
commit
03e728e129
24 changed files with 402 additions and 294 deletions
|
|
@ -79,13 +79,16 @@ internal abstract class FontHandle : IFontHandle
|
|||
/// <param name="font">The font, locked during the call of <see cref="ImFontChanged"/>.</param>
|
||||
public void InvokeImFontChanged(ILockedImFont font)
|
||||
{
|
||||
try
|
||||
foreach (var d in Delegate.EnumerateInvocationList(this.ImFontChanged))
|
||||
{
|
||||
this.ImFontChanged?.Invoke(this, font);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(e, $"{nameof(this.InvokeImFontChanged)}: error");
|
||||
try
|
||||
{
|
||||
d(this, font);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(e, $"{nameof(this.InvokeImFontChanged)}: error calling {d.Method.Name}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue