/// <summary>Raise a <see cref="LoadedGame"/> event.</summary> /// <param name="monitor">Encapsulates monitoring and logging.</param> /// <param name="loaded">Whether the save has been loaded. This is always true.</param> internal static void InvokeLoadedGame(IMonitor monitor, EventArgsLoadedGameChanged loaded) { if (PlayerEvents.LoadedGame == null) { return; } string name = $"{nameof(PlayerEvents)}.{nameof(PlayerEvents.LoadedGame)}"; Delegate[] handlers = PlayerEvents.LoadedGame.GetInvocationList(); PlayerEvents.DeprecationManager.WarnForEvent(handlers, name, "1.6", DeprecationLevel.Info); monitor.SafelyRaiseGenericEvent(name, handlers, null, loaded); }
internal static void InvokeLoadedGame(EventArgsLoadedGameChanged loaded) { EventCommon.SafeInvoke(LoadedGame, null, loaded); }
/********* ** Internal methods *********/ /// <summary>Raise a <see cref="LoadedGame"/> event.</summary> /// <param name="monitor">Encapsulates monitoring and logging.</param> /// <param name="loaded">Whether the save has been loaded. This is always true.</param> internal static void InvokeLoadedGame(IMonitor monitor, EventArgsLoadedGameChanged loaded) { monitor.SafelyRaiseGenericEvent($"{nameof(PlayerEvents)}.{nameof(PlayerEvents.LoadedGame)}", PlayerEvents.LoadedGame?.GetInvocationList(), null, loaded); }
internal static void InvokeLoadedGame(EventArgsLoadedGameChanged loaded) { LoadedGame.Invoke(null, loaded); }