public static void RemovedHandler(this IRelicManager manager, RelicNotifyHandler notifyHandler) { if (manager == null) { return; } var notifier = manager.Notifier; if (notifier == null) { return; } notifier.Removed += notifyHandler; }
private void ExecuteHandlers(RelicItem item, RelicNotifyHandler tempNotifyHandler) { if (tempNotifyHandler == null) { return; } var handlerList = tempNotifyHandler.GetInvocationList(); foreach (RelicNotifyHandler handler in handlerList) { try { handler(item); } catch (Exception exception) { OnErrored(item, exception); } } }