/********* ** Private methods *********/ /// <summary>Get the mod name for a given event handler to display in performance monitoring reports.</summary> /// <param name="handler">The event handler.</param> private string GetModNameForPerformanceCounters(ManagedEventHandler <TEventArgs> handler) { IModMetadata mod = handler.SourceMod; return(mod.HasManifest() ? mod.Manifest.UniqueID : mod.DisplayName); }
/********* ** Private methods *********/ /// <summary>Get the mod name for a given event handler to display in performance monitoring reports.</summary> /// <param name="handler">The event handler.</param> private string GetModNameForPerformanceCounters(EventHandler <TEventArgs> handler) { IModMetadata mod = this.GetSourceMod(handler); if (mod == null) { return(Constants.GamePerformanceCounterName); } return(mod.HasManifest() ? mod.Manifest.UniqueID : mod.DisplayName); }