using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Mirror;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
using YAPYAP;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("com.Omniscye.ReportCards")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+174558dd641ee37bf40ded0d24866ac172d24388")]
[assembly: AssemblyProduct("com.Omniscye.ReportCards")]
[assembly: AssemblyTitle("EmpressReportCards")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace BepInEx
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
[Conditional("CodeGeneration")]
internal sealed class BepInAutoPluginAttribute : Attribute
{
public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
{
}
}
}
namespace BepInEx.Preloader.Core.Patching
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
[Conditional("CodeGeneration")]
internal sealed class PatcherAutoPluginAttribute : Attribute
{
public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
{
}
}
}
namespace PerformanceReportYapYap
{
[HarmonyPatch]
internal static class HarmonyPatches
{
[HarmonyPrefix]
[HarmonyPatch(typeof(PawnHurtbox), "SvSetHealth")]
private static void PawnHurtbox_SvSetHealth_Prefix(PawnHurtbox __instance, out int __state)
{
__state = (((Object)(object)__instance != (Object)null) ? __instance.Health : 0);
}
[HarmonyPostfix]
[HarmonyPatch(typeof(PawnHurtbox), "SvSetHealth")]
private static void PawnHurtbox_SvSetHealth_Postfix(PawnHurtbox __instance, int __state)
{
if (!NetworkServer.active || (Object)(object)__instance == (Object)null)
{
return;
}
int health = __instance.Health;
int num = __state - health;
if (num > 0)
{
Pawn pawn = __instance.pawn;
if (!((Object)(object)pawn == (Object)null))
{
string playerId = ReportManager.GetPlayerId(pawn);
PerformanceReportPlugin.Manager.TrackDamage(playerId, num);
PerformanceReportPlugin.Manager.RegisterPlayer(playerId, pawn.PlayerName);
}
}
}
[HarmonyPostfix]
[HarmonyPatch(typeof(ChaosScoreTagBehaviourSO), "SvOnActivated")]
public static void ChaosScoreTagBehaviourSO_SvOnActivated_Postfix(ChaosScoreTagBehaviourSO __instance, GameplayTag tag, TaggableObject target)
{
if (!NetworkServer.active || (Object)(object)GameManager.Instance == (Object)null || !GameManager.Instance.RoundPlaying)
{
return;
}
ValuableObject component = ((Component)target).GetComponent<ValuableObject>();
if ((Object)(object)component == (Object)null)
{
return;
}
uint recentInteractorNetId = component.RecentInteractorNetId;
if (recentInteractorNetId == 0)
{
return;
}
float scoreMultiplier = __instance.GetScoreMultiplier(tag);
int amount = Mathf.Max(Mathf.RoundToInt((float)component.Value * scoreMultiplier), 1);
if (NetworkServer.spawned.TryGetValue(recentInteractorNetId, out var value) && (Object)(object)value != (Object)null)
{
Pawn component2 = ((Component)value).GetComponent<Pawn>();
if ((Object)(object)component2 != (Object)null)
{
string playerId = ReportManager.GetPlayerId(component2);
PerformanceReportPlugin.Manager.TrackChaos(playerId, amount);
PerformanceReportPlugin.Manager.RegisterPlayer(playerId, component2.PlayerName);
}
}
}
[HarmonyPostfix]
[HarmonyPatch(typeof(PropDestroyTriggerEvent), "TriggerEvent")]
public static void PropDestroyTriggerEvent_TriggerEvent_Postfix(PropDestroyTriggerEvent __instance)
{
if (!NetworkServer.active || (Object)(object)GameManager.Instance == (Object)null || !GameManager.Instance.RoundPlaying)
{
return;
}
int addScore = __instance.addScore;
if (addScore <= 0 || (Object)(object)__instance.valuable == (Object)null)
{
return;
}
uint recentInteractorNetId = __instance.valuable.RecentInteractorNetId;
if (recentInteractorNetId != 0 && NetworkServer.spawned.TryGetValue(recentInteractorNetId, out var value) && (Object)(object)value != (Object)null)
{
Pawn component = ((Component)value).GetComponent<Pawn>();
if ((Object)(object)component != (Object)null)
{
string playerId = ReportManager.GetPlayerId(component);
PerformanceReportPlugin.Manager.TrackChaos(playerId, addScore);
PerformanceReportPlugin.Manager.RegisterPlayer(playerId, component.PlayerName);
}
}
}
}
[HarmonyPatch]
internal static class Hooks
{
[HarmonyPostfix]
[HarmonyPatch(typeof(GameManager), "OnStartServer")]
private static void GameManager_OnStartServer_Postfix()
{
GameManager.OnGameStateChangedAction -= OnGameStateChanged;
GameManager.OnRoundFinishedAction -= OnRoundFinished;
GameManager.OnPlayerSpawned -= OnPlayerSpawned;
GameManager.OnPlayerDeath -= OnPlayerDeath;
GameManager.OnPlayerExtracted -= OnPlayerExtracted;
GameManager.OnGameStateChangedAction += OnGameStateChanged;
GameManager.OnRoundFinishedAction += OnRoundFinished;
GameManager.OnPlayerSpawned += OnPlayerSpawned;
GameManager.OnPlayerDeath += OnPlayerDeath;
GameManager.OnPlayerExtracted += OnPlayerExtracted;
}
private static void OnGameStateChanged()
{
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Invalid comparison between Unknown and I4
if (NetworkServer.active)
{
GameManager instance = GameManager.Instance;
if (!((Object)(object)instance == (Object)null) && (int)instance.CurrentGameState == 1)
{
PerformanceReportPlugin.Manager.ResetRound();
}
}
}
private static void OnRoundFinished()
{
if (NetworkServer.active)
{
PerformanceReportPlugin.Manager.EndRound();
}
}
private static void OnPlayerSpawned(Pawn pawn)
{
if (NetworkServer.active && !((Object)(object)pawn == (Object)null))
{
string playerId = ReportManager.GetPlayerId(pawn);
PerformanceReportPlugin.Manager.RegisterPlayer(playerId, pawn.PlayerName);
}
}
private static void OnPlayerDeath(Pawn pawn)
{
if (NetworkServer.active && !((Object)(object)pawn == (Object)null))
{
string playerId = ReportManager.GetPlayerId(pawn);
PerformanceReportPlugin.Manager.TrackDeath(playerId);
PerformanceReportPlugin.Manager.RegisterPlayer(playerId, pawn.PlayerName);
}
}
private static void OnPlayerExtracted(Pawn pawn)
{
if (NetworkServer.active && !((Object)(object)pawn == (Object)null))
{
string playerId = ReportManager.GetPlayerId(pawn);
PerformanceReportPlugin.Manager.TrackExtract(playerId, pawn.PlayerName);
PerformanceReportPlugin.Manager.RegisterPlayer(playerId, pawn.PlayerName);
}
}
}
[Serializable]
public class PlayerSessionStats
{
public string PlayerId = "";
public string LastKnownName = "";
public int TotalGames;
public int TotalDeaths;
public int TotalDamageTaken;
public int TotalExtracts;
public int TotalChaos;
public float AverageGradePoint;
public long LastSeenUtcTicks;
public string GetGradeTag()
{
if (AverageGradePoint >= 4.5f)
{
return "<color=#FFD700>S+</color>";
}
if (AverageGradePoint >= 4f)
{
return "<color=#00FF00>A</color>";
}
if (AverageGradePoint >= 3f)
{
return "<color=#ADFF2F>B</color>";
}
if (AverageGradePoint >= 2f)
{
return "<color=#FFA500>C</color>";
}
if (AverageGradePoint >= 1f)
{
return "<color=#FF4500>D</color>";
}
return "<color=#FF0000>F</color>";
}
}
[Serializable]
public class SavedData
{
public List<PlayerSessionStats> Players = new List<PlayerSessionStats>();
}
public sealed class SessionTracker
{
public string PlayerId = "";
public string Name = "Unknown";
public int DamageTaken;
public int ChaosScore;
public bool Died;
public bool Extracted;
}
[BepInPlugin("com.EMpress.performancereport.yapyap", "Performance Report (YapYap)", "1.0.6")]
public class PerformanceReportPlugin : BaseUnityPlugin
{
internal static PerformanceReportPlugin Instance;
internal static ManualLogSource Log;
internal static ReportManager Manager;
public static TMP_FontAsset GameFont;
private Harmony _harmony;
private GameObject _uiRoot;
internal RatingsUI _ui;
private void Awake()
{
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: Expected O, but got Unknown
((Component)this).gameObject.transform.parent = null;
((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
Instance = this;
Log = ((BaseUnityPlugin)this).Logger;
Manager = new ReportManager();
_harmony = new Harmony("com.EMpress.performancereport.yapyap");
_harmony.PatchAll(typeof(Hooks));
_harmony.PatchAll(typeof(HarmonyPatches));
_harmony.PatchAll(typeof(UISettingsInjector));
_uiRoot = new GameObject("PerformanceReportUI_Root");
((Object)_uiRoot).hideFlags = (HideFlags)61;
Object.DontDestroyOnLoad((Object)(object)_uiRoot);
_ui = _uiRoot.AddComponent<RatingsUI>();
((Behaviour)_ui).enabled = true;
((BaseUnityPlugin)this).Logger.LogInfo((object)"Performance Report (YapYap) loaded. Chaos Tracking V2 (Destruction Support).");
}
private void OnDestroy()
{
try
{
Harmony harmony = _harmony;
if (harmony != null)
{
harmony.UnpatchSelf();
}
}
catch
{
}
}
}
internal sealed class RatingsUI : MonoBehaviour
{
private Canvas _canvas;
private GameObject _panel;
private RectTransform _content;
private bool _built;
private TMP_FontAsset _activeFont;
private const float RowHeight = 38f;
private const float ColGrade = 80f;
private const float ColChaos = 100f;
private const float ColGames = 80f;
private const float ColDeaths = 90f;
private void Awake()
{
((Component)this).transform.parent = null;
((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
}
private void Update()
{
if (Input.GetKeyDown((KeyCode)287))
{
Toggle();
}
}
public void Toggle()
{
if (!_built)
{
Build();
}
((Behaviour)_canvas).enabled = !((Behaviour)_canvas).enabled;
if (((Behaviour)_canvas).enabled)
{
Refresh();
}
}
private void Build()
{
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00d9: Expected O, but got Unknown
//IL_010f: Unknown result type (might be due to invalid IL or missing references)
//IL_012f: Unknown result type (might be due to invalid IL or missing references)
//IL_0144: Unknown result type (might be due to invalid IL or missing references)
//IL_014f: Unknown result type (might be due to invalid IL or missing references)
//IL_0159: Unknown result type (might be due to invalid IL or missing references)
//IL_0168: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Expected O, but got Unknown
//IL_0196: Unknown result type (might be due to invalid IL or missing references)
//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
//IL_022a: Unknown result type (might be due to invalid IL or missing references)
//IL_0244: Unknown result type (might be due to invalid IL or missing references)
//IL_024f: Unknown result type (might be due to invalid IL or missing references)
//IL_0264: Unknown result type (might be due to invalid IL or missing references)
//IL_026e: Unknown result type (might be due to invalid IL or missing references)
//IL_027d: Unknown result type (might be due to invalid IL or missing references)
//IL_0283: Expected O, but got Unknown
//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0317: Unknown result type (might be due to invalid IL or missing references)
//IL_031c: Unknown result type (might be due to invalid IL or missing references)
//IL_0356: Unknown result type (might be due to invalid IL or missing references)
//IL_0371: Unknown result type (might be due to invalid IL or missing references)
//IL_0381: Unknown result type (might be due to invalid IL or missing references)
//IL_0391: Unknown result type (might be due to invalid IL or missing references)
//IL_03a0: Unknown result type (might be due to invalid IL or missing references)
//IL_03b6: Unknown result type (might be due to invalid IL or missing references)
//IL_03c0: Expected O, but got Unknown
//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
//IL_03cc: Expected O, but got Unknown
//IL_03f6: Unknown result type (might be due to invalid IL or missing references)
//IL_040b: Unknown result type (might be due to invalid IL or missing references)
//IL_0416: Unknown result type (might be due to invalid IL or missing references)
//IL_0420: Unknown result type (might be due to invalid IL or missing references)
//IL_0445: Unknown result type (might be due to invalid IL or missing references)
//IL_0454: Unknown result type (might be due to invalid IL or missing references)
//IL_045b: Expected O, but got Unknown
//IL_047a: Unknown result type (might be due to invalid IL or missing references)
//IL_0486: Unknown result type (might be due to invalid IL or missing references)
//IL_049c: Unknown result type (might be due to invalid IL or missing references)
//IL_04b2: Unknown result type (might be due to invalid IL or missing references)
//IL_04c9: Unknown result type (might be due to invalid IL or missing references)
//IL_04d0: Expected O, but got Unknown
//IL_0501: Unknown result type (might be due to invalid IL or missing references)
//IL_051b: Unknown result type (might be due to invalid IL or missing references)
//IL_0535: Unknown result type (might be due to invalid IL or missing references)
//IL_0545: Unknown result type (might be due to invalid IL or missing references)
//IL_055f: Unknown result type (might be due to invalid IL or missing references)
//IL_05a6: Unknown result type (might be due to invalid IL or missing references)
//IL_05b0: Expected O, but got Unknown
_built = true;
_activeFont = PerformanceReportPlugin.GameFont;
if ((Object)(object)_activeFont == (Object)null)
{
_activeFont = TMP_Settings.defaultFontAsset;
}
if ((Object)(object)_activeFont == (Object)null)
{
_activeFont = Resources.FindObjectsOfTypeAll<TMP_FontAsset>().FirstOrDefault();
}
GameObject val = new GameObject("PR_Canvas");
((Object)val).hideFlags = (HideFlags)61;
val.transform.SetParent(((Component)this).transform, false);
_canvas = val.AddComponent<Canvas>();
_canvas.renderMode = (RenderMode)0;
_canvas.sortingOrder = 10000;
CanvasScaler obj = val.AddComponent<CanvasScaler>();
obj.uiScaleMode = (ScaleMode)1;
obj.referenceResolution = new Vector2(1920f, 1080f);
obj.matchWidthOrHeight = 0.5f;
val.AddComponent<GraphicRaycaster>();
_panel = new GameObject("PR_Panel");
_panel.transform.SetParent(val.transform, false);
((Graphic)_panel.AddComponent<Image>()).color = new Color(0.08f, 0.08f, 0.08f, 0.98f);
RectTransform component = _panel.GetComponent<RectTransform>();
component.anchorMin = new Vector2(0.2f, 0.2f);
component.anchorMax = new Vector2(0.8f, 0.8f);
component.offsetMin = Vector2.zero;
component.offsetMax = Vector2.zero;
GameObject val2 = new GameObject("Header");
val2.transform.SetParent(_panel.transform, false);
RectTransform obj2 = val2.AddComponent<RectTransform>();
obj2.anchorMin = new Vector2(0.05f, 0.86f);
obj2.anchorMax = new Vector2(0.95f, 0.98f);
obj2.offsetMin = Vector2.zero;
obj2.offsetMax = Vector2.zero;
GameObject val3 = new GameObject("Title");
val3.transform.SetParent(val2.transform, false);
TextMeshProUGUI obj3 = val3.AddComponent<TextMeshProUGUI>();
((TMP_Text)obj3).font = _activeFont;
((TMP_Text)obj3).text = "PERFORMANCE REPORT";
((TMP_Text)obj3).fontSize = 34f;
((TMP_Text)obj3).fontStyle = (FontStyles)1;
((Graphic)obj3).color = new Color(1f, 0.88f, 0.2f, 1f);
((TMP_Text)obj3).alignment = (TextAlignmentOptions)513;
RectTransform component2 = val3.GetComponent<RectTransform>();
component2.anchorMin = Vector2.zero;
component2.anchorMax = Vector2.one;
component2.offsetMin = new Vector2(20f, 0f);
component2.offsetMax = Vector2.zero;
GameObject val4 = new GameObject("CloseButton");
val4.transform.SetParent(_panel.transform, false);
RectTransform obj4 = val4.AddComponent<RectTransform>();
obj4.anchorMin = new Vector2(0.95f, 0.92f);
obj4.anchorMax = new Vector2(0.99f, 0.98f);
obj4.offsetMin = Vector2.zero;
obj4.offsetMax = Vector2.zero;
Image val5 = val4.AddComponent<Image>();
((Graphic)val5).color = new Color(0f, 0f, 0f, 0f);
Button obj5 = val4.AddComponent<Button>();
((Selectable)obj5).targetGraphic = (Graphic)(object)val5;
GameObject val6 = new GameObject("X");
val6.transform.SetParent(val4.transform, false);
TextMeshProUGUI obj6 = val6.AddComponent<TextMeshProUGUI>();
((TMP_Text)obj6).font = _activeFont;
((TMP_Text)obj6).text = "X";
((TMP_Text)obj6).fontSize = 28f;
((Graphic)obj6).color = Color.red;
((TMP_Text)obj6).alignment = (TextAlignmentOptions)514;
((TMP_Text)obj6).rectTransform.anchorMin = Vector2.zero;
((TMP_Text)obj6).rectTransform.anchorMax = Vector2.one;
((TMP_Text)obj6).rectTransform.offsetMin = Vector2.zero;
((TMP_Text)obj6).rectTransform.offsetMax = Vector2.zero;
((UnityEvent)obj5.onClick).AddListener((UnityAction)delegate
{
((Behaviour)_canvas).enabled = false;
});
GameObject val7 = new GameObject("ScrollRoot");
val7.transform.SetParent(_panel.transform, false);
RectTransform obj7 = val7.AddComponent<RectTransform>();
obj7.anchorMin = new Vector2(0.05f, 0.05f);
obj7.anchorMax = new Vector2(0.95f, 0.83f);
obj7.offsetMin = Vector2.zero;
obj7.offsetMax = Vector2.zero;
((Graphic)val7.AddComponent<Image>()).color = new Color(0f, 0f, 0f, 0.45f);
GameObject val8 = new GameObject("Viewport");
val8.transform.SetParent(val7.transform, false);
RectTransform val9 = val8.AddComponent<RectTransform>();
val9.anchorMin = Vector2.zero;
val9.anchorMax = Vector2.one;
val9.offsetMin = new Vector2(10f, 10f);
val9.offsetMax = new Vector2(-10f, -10f);
val8.AddComponent<RectMask2D>();
GameObject val10 = new GameObject("Content");
val10.transform.SetParent(val8.transform, false);
_content = val10.AddComponent<RectTransform>();
_content.anchorMin = new Vector2(0f, 1f);
_content.anchorMax = new Vector2(1f, 1f);
_content.pivot = new Vector2(0.5f, 1f);
_content.anchoredPosition3D = Vector3.zero;
_content.sizeDelta = new Vector2(0f, 0f);
VerticalLayoutGroup obj8 = val10.AddComponent<VerticalLayoutGroup>();
((LayoutGroup)obj8).childAlignment = (TextAnchor)0;
((HorizontalOrVerticalLayoutGroup)obj8).childControlWidth = true;
((HorizontalOrVerticalLayoutGroup)obj8).childForceExpandWidth = true;
((HorizontalOrVerticalLayoutGroup)obj8).childControlHeight = true;
((HorizontalOrVerticalLayoutGroup)obj8).childForceExpandHeight = false;
((HorizontalOrVerticalLayoutGroup)obj8).spacing = 8f;
((LayoutGroup)obj8).padding = new RectOffset(12, 12, 12, 12);
ContentSizeFitter obj9 = val10.AddComponent<ContentSizeFitter>();
obj9.horizontalFit = (FitMode)0;
obj9.verticalFit = (FitMode)2;
ScrollRect obj10 = val7.AddComponent<ScrollRect>();
obj10.horizontal = false;
obj10.vertical = true;
obj10.scrollSensitivity = 30f;
obj10.viewport = val9;
obj10.content = _content;
((Behaviour)_canvas).enabled = false;
}
private TextMeshProUGUI CreateCell(Transform parent, string txt, TextAlignmentOptions align, float fontSize, Color color, bool rich)
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
GameObject val = new GameObject("Cell");
val.transform.SetParent(parent, false);
TextMeshProUGUI obj = val.AddComponent<TextMeshProUGUI>();
((TMP_Text)obj).font = _activeFont;
((TMP_Text)obj).text = txt;
((TMP_Text)obj).fontSize = fontSize;
((Graphic)obj).color = color;
((TMP_Text)obj).alignment = align;
((TMP_Text)obj).richText = rich;
((TMP_Text)obj).enableWordWrapping = false;
((TMP_Text)obj).overflowMode = (TextOverflowModes)1;
RectTransform rectTransform = ((TMP_Text)obj).rectTransform;
rectTransform.anchorMin = Vector2.zero;
rectTransform.anchorMax = Vector2.one;
rectTransform.offsetMin = Vector2.zero;
rectTransform.offsetMax = Vector2.zero;
return obj;
}
private GameObject CreateRowContainer(Transform parent, bool header)
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Expected O, but got Unknown
//IL_00ce: Expected O, but got Unknown
GameObject val = new GameObject(header ? "HeaderRow" : "PlayerRow");
val.transform.SetParent(parent, false);
((Graphic)val.AddComponent<Image>()).color = (header ? new Color(1f, 1f, 1f, 0.06f) : new Color(1f, 1f, 1f, 0.05f));
LayoutElement obj = val.AddComponent<LayoutElement>();
obj.minHeight = 38f;
obj.preferredHeight = 38f;
obj.flexibleWidth = 1f;
HorizontalLayoutGroup obj2 = val.AddComponent<HorizontalLayoutGroup>();
((LayoutGroup)obj2).childAlignment = (TextAnchor)3;
((HorizontalOrVerticalLayoutGroup)obj2).childControlWidth = true;
((HorizontalOrVerticalLayoutGroup)obj2).childForceExpandWidth = false;
((HorizontalOrVerticalLayoutGroup)obj2).childControlHeight = true;
((HorizontalOrVerticalLayoutGroup)obj2).childForceExpandHeight = true;
((HorizontalOrVerticalLayoutGroup)obj2).spacing = 16f;
((LayoutGroup)obj2).padding = new RectOffset(10, 10, 0, 0);
return val;
}
private GameObject CreateColumn(Transform parent, float width, bool flexible)
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Expected O, but got Unknown
//IL_0043: Expected O, but got Unknown
GameObject val = new GameObject("Col");
val.transform.SetParent(parent, false);
LayoutElement val2 = val.AddComponent<LayoutElement>();
if (flexible)
{
val2.flexibleWidth = 1f;
val2.minWidth = 0f;
val2.preferredWidth = -1f;
return val;
}
val2.flexibleWidth = 0f;
val2.minWidth = width;
val2.preferredWidth = width;
return val;
}
private void CreateRow(Transform parent, bool header, string name, string grade, string chaos, string games, string deaths)
{
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Unknown result type (might be due to invalid IL or missing references)
//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
//IL_0126: Unknown result type (might be due to invalid IL or missing references)
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
//IL_014d: Unknown result type (might be due to invalid IL or missing references)
//IL_0146: Unknown result type (might be due to invalid IL or missing references)
GameObject val = CreateRowContainer(parent, header);
GameObject val2 = CreateColumn(val.transform, 0f, flexible: true);
GameObject val3 = CreateColumn(val.transform, 80f, flexible: false);
GameObject val4 = CreateColumn(val.transform, 100f, flexible: false);
GameObject val5 = CreateColumn(val.transform, 80f, flexible: false);
GameObject val6 = CreateColumn(val.transform, 90f, flexible: false);
Color val7 = default(Color);
((Color)(ref val7))..ctor(0.65f, 0.65f, 0.65f, 1f);
CreateCell(val2.transform, name, (TextAlignmentOptions)513, 20f, header ? val7 : Color.white, rich: false);
CreateCell(val3.transform, grade, (TextAlignmentOptions)514, 20f, header ? val7 : Color.white, !header);
CreateCell(val4.transform, chaos, (TextAlignmentOptions)514, 20f, (Color)(header ? val7 : new Color(1f, 0.5f, 0.8f)), rich: false);
CreateCell(val5.transform, games, (TextAlignmentOptions)514, 20f, header ? val7 : Color.white, rich: false);
CreateCell(val6.transform, deaths, (TextAlignmentOptions)514, 20f, header ? val7 : Color.white, rich: false);
}
private void Refresh()
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
//IL_0157: Unknown result type (might be due to invalid IL or missing references)
if (!_built)
{
return;
}
foreach (Transform item in (Transform)_content)
{
Object.Destroy((Object)(object)((Component)item).gameObject);
}
CreateRow((Transform)(object)_content, header: true, "NAME", "GRADE", "CHAOS", "GAMES", "DEATHS");
GameObject val = new GameObject("Divider");
val.transform.SetParent((Transform)(object)_content, false);
((Graphic)val.AddComponent<Image>()).color = new Color(1f, 1f, 1f, 0.2f);
LayoutElement obj = val.AddComponent<LayoutElement>();
obj.minHeight = 2f;
obj.preferredHeight = 2f;
SavedData persistentData = PerformanceReportPlugin.Manager.PersistentData;
if (persistentData == null || persistentData.Players == null || persistentData.Players.Count == 0)
{
GameObject val2 = new GameObject("EmptyMsg");
val2.transform.SetParent((Transform)(object)_content, false);
LayoutElement obj2 = val2.AddComponent<LayoutElement>();
obj2.minHeight = 60f;
obj2.preferredHeight = 60f;
obj2.flexibleWidth = 1f;
TextMeshProUGUI obj3 = val2.AddComponent<TextMeshProUGUI>();
((TMP_Text)obj3).font = _activeFont;
((TMP_Text)obj3).text = "No data recorded yet.\nPlay a round as Host to track stats.";
((TMP_Text)obj3).fontSize = 18f;
((Graphic)obj3).color = Color.white;
((TMP_Text)obj3).alignment = (TextAlignmentOptions)513;
((TMP_Text)obj3).enableWordWrapping = true;
((TMP_Text)obj3).richText = false;
LayoutRebuilder.ForceRebuildLayoutImmediate(_content);
return;
}
foreach (PlayerSessionStats item2 in persistentData.Players.OrderByDescending((PlayerSessionStats p) => p.LastSeenUtcTicks).ToList())
{
string text = (string.IsNullOrEmpty(item2.LastKnownName) ? item2.PlayerId : item2.LastKnownName);
if (text.Length > 36)
{
text = text.Substring(0, 33) + "...";
}
string gradeTag = item2.GetGradeTag();
string chaos = item2.TotalChaos.ToString("N0");
string games = item2.TotalGames.ToString();
string deaths = item2.TotalDeaths.ToString();
CreateRow((Transform)(object)_content, header: false, text, gradeTag, chaos, games, deaths);
}
LayoutRebuilder.ForceRebuildLayoutImmediate(_content);
}
}
public sealed class ReportManager
{
public readonly Dictionary<string, SessionTracker> CurrentSession = new Dictionary<string, SessionTracker>();
public SavedData PersistentData = new SavedData();
private readonly string _savePath;
private bool _roundCommitted;
public ReportManager()
{
_savePath = Path.Combine(Paths.ConfigPath, "PerformanceReport_YapYap_Data.json");
Load();
}
public void ResetRound()
{
CurrentSession.Clear();
_roundCommitted = false;
try
{
Pawn[] array = Object.FindObjectsOfType<Pawn>();
foreach (Pawn val in array)
{
if ((Object)(object)val != (Object)null && ((Behaviour)val).isActiveAndEnabled && (Object)(object)((NetworkBehaviour)val).netIdentity != (Object)null)
{
RegisterPlayer(GetPlayerId(val), val.PlayerName);
}
}
}
catch
{
}
}
public void RegisterPlayer(string playerId, string name)
{
if (!string.IsNullOrEmpty(playerId))
{
if (!CurrentSession.TryGetValue(playerId, out SessionTracker value))
{
value = new SessionTracker
{
PlayerId = playerId,
Name = (name ?? "Unknown")
};
CurrentSession[playerId] = value;
}
else if (!string.IsNullOrEmpty(name) && name != "Unknown")
{
value.Name = name;
}
}
}
public void TrackDamage(string playerId, int amount)
{
if (!_roundCommitted && !string.IsNullOrEmpty(playerId) && amount > 0)
{
if (!CurrentSession.ContainsKey(playerId))
{
RegisterPlayer(playerId, "Unknown");
}
CurrentSession[playerId].DamageTaken += amount;
}
}
public void TrackChaos(string playerId, int amount)
{
if (!_roundCommitted && !string.IsNullOrEmpty(playerId) && amount > 0)
{
if (!CurrentSession.ContainsKey(playerId))
{
RegisterPlayer(playerId, "Unknown");
}
CurrentSession[playerId].ChaosScore += amount;
}
}
public void TrackDeath(string playerId)
{
if (!_roundCommitted && !string.IsNullOrEmpty(playerId))
{
if (!CurrentSession.ContainsKey(playerId))
{
RegisterPlayer(playerId, "Unknown");
}
CurrentSession[playerId].Died = true;
}
}
public void TrackExtract(string playerId, string name)
{
if (!string.IsNullOrEmpty(playerId))
{
if (!CurrentSession.ContainsKey(playerId))
{
RegisterPlayer(playerId, name);
}
CurrentSession[playerId].Extracted = true;
}
}
public void EndRound()
{
if (_roundCommitted)
{
return;
}
if (CurrentSession.Count == 0)
{
_roundCommitted = true;
return;
}
foreach (SessionTracker value in CurrentSession.Values)
{
float num = 5f;
if (value.Died)
{
num -= 3f;
}
else if (value.DamageTaken > 50)
{
num -= 1f;
}
else if (value.DamageTaken > 20)
{
num -= 0.5f;
}
if (value.ChaosScore > 500)
{
num += 0.5f;
}
if (!value.Extracted && !value.Died)
{
num -= 1f;
}
if (value.Extracted)
{
num += 0.5f;
}
num = Mathf.Clamp(num, 0f, 5.5f);
UpdatePersistentStats(value, num);
}
Save();
_roundCommitted = true;
}
private void UpdatePersistentStats(SessionTracker current, float roundGrade)
{
SessionTracker current2 = current;
PlayerSessionStats playerSessionStats = PersistentData.Players.FirstOrDefault((PlayerSessionStats x) => x.PlayerId == current2.PlayerId);
if (playerSessionStats == null)
{
playerSessionStats = new PlayerSessionStats
{
PlayerId = current2.PlayerId,
AverageGradePoint = roundGrade,
TotalGames = 0
};
PersistentData.Players.Add(playerSessionStats);
}
playerSessionStats.LastKnownName = current2.Name;
playerSessionStats.TotalGames++;
playerSessionStats.TotalDamageTaken += current2.DamageTaken;
playerSessionStats.TotalChaos += current2.ChaosScore;
playerSessionStats.LastSeenUtcTicks = DateTime.UtcNow.Ticks;
if (current2.Died)
{
playerSessionStats.TotalDeaths++;
}
if (current2.Extracted)
{
playerSessionStats.TotalExtracts++;
}
playerSessionStats.AverageGradePoint = (playerSessionStats.AverageGradePoint * (float)(playerSessionStats.TotalGames - 1) + roundGrade) / (float)playerSessionStats.TotalGames;
}
public void Save()
{
try
{
string contents = JsonUtility.ToJson((object)PersistentData, true);
File.WriteAllText(_savePath, contents);
}
catch (Exception arg)
{
Debug.LogError((object)$"[PerformanceReport] Failed to save stats: {arg}");
}
}
public void Load()
{
if (!File.Exists(_savePath))
{
return;
}
try
{
SavedData savedData = JsonUtility.FromJson<SavedData>(File.ReadAllText(_savePath));
if (savedData != null && savedData.Players != null)
{
PersistentData = savedData;
}
}
catch (Exception arg)
{
Debug.LogError((object)$"[PerformanceReport] Failed to load stats: {arg}");
}
}
public static string GetPlayerId(Pawn pawn)
{
if ((Object)(object)pawn == (Object)null)
{
return "";
}
try
{
NetworkConnectionToClient connectionToClient = ((NetworkBehaviour)pawn).connectionToClient;
if (connectionToClient != null && !string.IsNullOrEmpty(connectionToClient.address) && ulong.TryParse(connectionToClient.address, out var result))
{
return result.ToString();
}
}
catch
{
}
return ((NetworkBehaviour)pawn).netId.ToString();
}
}
[HarmonyPatch(typeof(UISettings), "Start")]
public static class UISettingsInjector
{
[Serializable]
[CompilerGenerated]
private sealed class <>c
{
public static readonly <>c <>9 = new <>c();
public static UnityAction <>9__0_0;
internal void <Postfix>b__0_0()
{
if ((Object)(object)PerformanceReportPlugin.Instance._ui != (Object)null)
{
PerformanceReportPlugin.Instance._ui.Toggle();
}
}
}
[HarmonyPostfix]
public static void Postfix(UISettings __instance)
{
//IL_0162: Unknown result type (might be due to invalid IL or missing references)
//IL_0167: Unknown result type (might be due to invalid IL or missing references)
//IL_016d: Expected O, but got Unknown
Button val = null;
Button[] componentsInChildren = ((Component)__instance).GetComponentsInChildren<Button>(true);
foreach (Button val2 in componentsInChildren)
{
if (((Object)val2).name.IndexOf("Accessibility", StringComparison.OrdinalIgnoreCase) >= 0)
{
val = val2;
break;
}
TMP_Text componentInChildren = ((Component)val2).GetComponentInChildren<TMP_Text>(true);
if ((Object)(object)componentInChildren != (Object)null && componentInChildren.text.IndexOf("Accessibility", StringComparison.OrdinalIgnoreCase) >= 0)
{
val = val2;
break;
}
}
if ((Object)(object)val == (Object)null)
{
PerformanceReportPlugin.Log.LogWarning((object)"Could not find 'Accessibility' button. Injection failed.");
return;
}
TMP_Text componentInChildren2 = ((Component)val).GetComponentInChildren<TMP_Text>(true);
if ((Object)(object)componentInChildren2 != (Object)null)
{
PerformanceReportPlugin.GameFont = componentInChildren2.font;
}
GameObject obj = Object.Instantiate<GameObject>(((Component)val).gameObject, ((Component)val).transform.parent);
((Object)obj).name = "Btn_PlayerReportCard";
obj.transform.SetSiblingIndex(((Component)val).transform.GetSiblingIndex() + 1);
LocalisedTMP componentInChildren3 = obj.GetComponentInChildren<LocalisedTMP>();
if ((Object)(object)componentInChildren3 != (Object)null)
{
Object.DestroyImmediate((Object)(object)componentInChildren3);
}
LocalisedTMP_LastCommand componentInChildren4 = obj.GetComponentInChildren<LocalisedTMP_LastCommand>();
if ((Object)(object)componentInChildren4 != (Object)null)
{
Object.DestroyImmediate((Object)(object)componentInChildren4);
}
TMP_Text componentInChildren5 = obj.GetComponentInChildren<TMP_Text>();
if ((Object)(object)componentInChildren5 != (Object)null)
{
componentInChildren5.text = "PLAYER REPORT CARD";
componentInChildren5.fontSize *= 0.9f;
}
Button component = obj.GetComponent<Button>();
((UnityEventBase)component.onClick).RemoveAllListeners();
ButtonClickedEvent onClick = component.onClick;
object obj2 = <>c.<>9__0_0;
if (obj2 == null)
{
UnityAction val3 = delegate
{
if ((Object)(object)PerformanceReportPlugin.Instance._ui != (Object)null)
{
PerformanceReportPlugin.Instance._ui.Toggle();
}
};
<>c.<>9__0_0 = val3;
obj2 = (object)val3;
}
((UnityEvent)onClick).AddListener((UnityAction)obj2);
}
}
}
namespace System.Diagnostics.CodeAnalysis
{
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class ConstantExpectedAttribute : Attribute
{
public object? Min { get; set; }
public object? Max { get; set; }
}
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class ExperimentalAttribute : Attribute
{
public string DiagnosticId { get; }
public string? UrlFormat { get; set; }
public ExperimentalAttribute(string diagnosticId)
{
DiagnosticId = diagnosticId;
}
}
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
[ExcludeFromCodeCoverage]
internal sealed class MemberNotNullAttribute : Attribute
{
public string[] Members { get; }
public MemberNotNullAttribute(string member)
{
Members = new string[1] { member };
}
public MemberNotNullAttribute(params string[] members)
{
Members = members;
}
}
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
[ExcludeFromCodeCoverage]
internal sealed class MemberNotNullWhenAttribute : Attribute
{
public bool ReturnValue { get; }
public string[] Members { get; }
public MemberNotNullWhenAttribute(bool returnValue, string member)
{
ReturnValue = returnValue;
Members = new string[1] { member };
}
public MemberNotNullWhenAttribute(bool returnValue, params string[] members)
{
ReturnValue = returnValue;
Members = members;
}
}
[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class SetsRequiredMembersAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class StringSyntaxAttribute : Attribute
{
public const string CompositeFormat = "CompositeFormat";
public const string DateOnlyFormat = "DateOnlyFormat";
public const string DateTimeFormat = "DateTimeFormat";
public const string EnumFormat = "EnumFormat";
public const string GuidFormat = "GuidFormat";
public const string Json = "Json";
public const string NumericFormat = "NumericFormat";
public const string Regex = "Regex";
public const string TimeOnlyFormat = "TimeOnlyFormat";
public const string TimeSpanFormat = "TimeSpanFormat";
public const string Uri = "Uri";
public const string Xml = "Xml";
public string Syntax { get; }
public object?[] Arguments { get; }
public StringSyntaxAttribute(string syntax)
{
Syntax = syntax;
Arguments = new object[0];
}
public StringSyntaxAttribute(string syntax, params object?[] arguments)
{
Syntax = syntax;
Arguments = arguments;
}
}
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class UnscopedRefAttribute : Attribute
{
}
}
namespace System.Runtime.Versioning
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class RequiresPreviewFeaturesAttribute : Attribute
{
public string? Message { get; }
public string? Url { get; set; }
public RequiresPreviewFeaturesAttribute()
{
}
public RequiresPreviewFeaturesAttribute(string? message)
{
Message = message;
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class CallerArgumentExpressionAttribute : Attribute
{
public string ParameterName { get; }
public CallerArgumentExpressionAttribute(string parameterName)
{
ParameterName = parameterName;
}
}
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class CollectionBuilderAttribute : Attribute
{
public Type BuilderType { get; }
public string MethodName { get; }
public CollectionBuilderAttribute(Type builderType, string methodName)
{
BuilderType = builderType;
MethodName = methodName;
}
}
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class CompilerFeatureRequiredAttribute : Attribute
{
public const string RefStructs = "RefStructs";
public const string RequiredMembers = "RequiredMembers";
public string FeatureName { get; }
public bool IsOptional { get; set; }
public CompilerFeatureRequiredAttribute(string featureName)
{
FeatureName = featureName;
}
}
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class InterpolatedStringHandlerArgumentAttribute : Attribute
{
public string[] Arguments { get; }
public InterpolatedStringHandlerArgumentAttribute(string argument)
{
Arguments = new string[1] { argument };
}
public InterpolatedStringHandlerArgumentAttribute(params string[] arguments)
{
Arguments = arguments;
}
}
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class InterpolatedStringHandlerAttribute : Attribute
{
}
[EditorBrowsable(EditorBrowsableState.Never)]
[ExcludeFromCodeCoverage]
internal static class IsExternalInit
{
}
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class ModuleInitializerAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class OverloadResolutionPriorityAttribute : Attribute
{
public int Priority { get; }
public OverloadResolutionPriorityAttribute(int priority)
{
Priority = priority;
}
}
[AttributeUsage(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)]
[ExcludeFromCodeCoverage]
internal sealed class ParamCollectionAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class RequiredMemberAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
[EditorBrowsable(EditorBrowsableState.Never)]
[ExcludeFromCodeCoverage]
internal sealed class RequiresLocationAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Interface, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class SkipLocalsInitAttribute : Attribute
{
}
}