mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-15 12:27:43 +01:00
Add IFramework (#1286)
This commit is contained in:
parent
342e1bc06c
commit
385c4b7a8b
3 changed files with 150 additions and 87 deletions
|
|
@ -2,6 +2,7 @@ using System;
|
|||
using System.Linq;
|
||||
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Serilog;
|
||||
|
||||
using static Dalamud.Game.Framework;
|
||||
|
|
@ -72,12 +73,12 @@ internal static class EventHandlerExtensions
|
|||
/// </summary>
|
||||
/// <param name="updateDelegate">The OnUpdateDelegate in question.</param>
|
||||
/// <param name="framework">Framework to be passed on to OnUpdateDelegate.</param>
|
||||
public static void InvokeSafely(this OnUpdateDelegate updateDelegate, Framework framework)
|
||||
public static void InvokeSafely(this IFramework.OnUpdateDelegate updateDelegate, Framework framework)
|
||||
{
|
||||
if (updateDelegate == null)
|
||||
return;
|
||||
|
||||
foreach (var action in updateDelegate.GetInvocationList().Cast<OnUpdateDelegate>())
|
||||
foreach (var action in updateDelegate.GetInvocationList().Cast<IFramework.OnUpdateDelegate>())
|
||||
{
|
||||
HandleInvoke(() => action(framework));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue