using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using UnityEngine;
using Zorro.Core;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("htk6.PeakAdminBook")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyInformationalVersion("0.1.0")]
[assembly: AssemblyProduct("htk6.PeakAdminBook")]
[assembly: AssemblyTitle("Peak Admin Book")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[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]
[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]
[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")]
[Embedded]
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")]
[Embedded]
internal sealed class PatcherAutoPluginAttribute : Attribute
{
public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
{
}
}
}
namespace Microsoft.CodeAnalysis
{
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace PeakAdminBook
{
internal static class BookGranter
{
private const string GuidebookPrefab = "Guidebook";
private static readonly HashSet<int> Granted = new HashSet<int>();
internal static void Reset()
{
Granted.Clear();
}
internal static IEnumerator GrantWhenReady(Character character)
{
if ((Object)(object)character == (Object)null)
{
yield break;
}
yield return (object)new WaitForSeconds(2.5f);
if ((Object)(object)character == (Object)null || !PhotonNetwork.InRoom || !PhotonNetwork.IsMasterClient)
{
yield break;
}
PhotonView view = ((MonoBehaviourPun)character).photonView;
if ((Object)(object)view == (Object)null || !Granted.Add(view.ViewID))
{
yield break;
}
Player player = null;
for (int attempt = 0; attempt < 20; attempt++)
{
if (!((Object)(object)player == (Object)null))
{
break;
}
try
{
player = character.player;
}
catch
{
player = null;
}
if ((Object)(object)player == (Object)null)
{
yield return (object)new WaitForSeconds(0.5f);
}
}
Item val = default(Item);
ItemSlot val2 = default(ItemSlot);
if ((Object)(object)player == (Object)null)
{
Plugin.Log.LogWarning((object)("Could not resolve Player for " + ((Object)character).name + "; no book granted."));
Granted.Remove(view.ViewID);
}
else if (!ItemDatabase.TryGetItem("Guidebook", ref val) || (Object)(object)val == (Object)null)
{
Plugin.Log.LogError((object)"Item 'Guidebook' not found in the ItemDatabase.");
}
else if (player.AddItem(val.itemID, (ItemInstanceData)null, ref val2))
{
Plugin.Log.LogInfo((object)$"Granted admin book to {((Object)character).name} (slot {val2?.itemSlotID}).");
}
else
{
Plugin.Log.LogWarning((object)("Failed to grant admin book to " + ((Object)character).name + " (inventory full?)."));
}
}
}
internal sealed class CatalogEntry
{
public ushort Id;
public string PrefabName = string.Empty;
public string DisplayName = string.Empty;
public Texture2D? Icon;
}
internal static class ItemCatalog
{
private const string ItemResourceRoot = "0_Items/";
internal static readonly List<CatalogEntry> Entries = new List<CatalogEntry>();
internal static bool Ready { get; private set; }
internal static bool Building { get; private set; }
internal static int Scanned { get; private set; }
internal static int Total { get; private set; }
internal static int Skipped { get; private set; }
private static List<Item> GatherCandidates()
{
HashSet<int> seen = new HashSet<int>();
List<Item> result = new List<Item>();
ItemDatabase instance = SingletonAsset<ItemDatabase>.Instance;
if ((Object)(object)instance == (Object)null)
{
Plugin.Log.LogError((object)"ItemDatabase could not be loaded; catalog will be empty.");
return result;
}
if (instance.itemLookup != null)
{
foreach (KeyValuePair<ushort, Item> item in instance.itemLookup)
{
TryAdd(item.Value);
}
}
if (((DatabaseAsset<ItemDatabase, Item>)(object)instance).Objects != null)
{
foreach (Item @object in ((DatabaseAsset<ItemDatabase, Item>)(object)instance).Objects)
{
TryAdd(@object);
}
}
return result;
void TryAdd(Item? item)
{
if (!((Object)(object)item == (Object)null) && seen.Add(((Object)item).GetInstanceID()))
{
result.Add(item);
}
}
}
private static string ResolveDisplayName(Item item)
{
try
{
string name = item.GetName();
if (!string.IsNullOrWhiteSpace(name) && !name.StartsWith("NAME_", StringComparison.Ordinal))
{
return name.Trim();
}
}
catch (Exception ex)
{
Plugin.Log.LogDebug((object)("GetName() failed for " + ((Object)item).name + ": " + ex.Message));
}
return ((Object)((Component)item).gameObject).name;
}
internal static IEnumerator Build()
{
if (Building)
{
yield break;
}
Building = true;
Ready = false;
Entries.Clear();
Scanned = 0;
Skipped = 0;
List<Item> candidates = GatherCandidates();
Total = candidates.Count;
for (int i = 0; i < candidates.Count; i++)
{
Item val = candidates[i];
Scanned = i + 1;
string name = ((Object)((Component)val).gameObject).name;
if ((Object)(object)Resources.Load<GameObject>("0_Items/" + name) == (Object)null)
{
Skipped++;
Plugin.Log.LogDebug((object)("Skipping '" + name + "': not under 0_Items/"));
}
else
{
Entries.Add(new CatalogEntry
{
Id = val.itemID,
PrefabName = name,
DisplayName = ResolveDisplayName(val),
Icon = val.UIData?.icon
});
}
if (i % 20 == 0)
{
yield return null;
}
}
Entries.Sort(delegate(CatalogEntry a, CatalogEntry b)
{
int num = string.Compare(a.DisplayName, b.DisplayName, StringComparison.OrdinalIgnoreCase);
return (num == 0) ? string.Compare(a.PrefabName, b.PrefabName, StringComparison.OrdinalIgnoreCase) : num;
});
Ready = true;
Building = false;
Plugin.Log.LogInfo((object)$"Catalog built: {Entries.Count} spawnable items ({Skipped} skipped).");
if (!Plugin.DumpItemListOnLoad.Value)
{
yield break;
}
foreach (CatalogEntry entry in Entries)
{
Plugin.Log.LogInfo((object)$" [{entry.Id}] {entry.DisplayName} (prefab: {entry.PrefabName})");
}
}
internal static void Invalidate()
{
Ready = false;
Entries.Clear();
}
}
[HarmonyPatch(typeof(Character), "Start")]
internal static class CharacterStartPatch
{
private static void Postfix(Character __instance)
{
if (Plugin.GrantBookOnSpawn.Value)
{
((MonoBehaviour)Plugin.Instance).StartCoroutine(BookGranter.GrantWhenReady(__instance));
}
}
}
[HarmonyPatch(typeof(Action_Guidebook), "RunAction")]
internal static class GuidebookActionPatch
{
private static bool Prefix(Action_Guidebook __instance)
{
if (!Plugin.ReplaceAllGuidebooks.Value)
{
return true;
}
Guidebook component = ((Component)__instance).GetComponent<Guidebook>();
if ((Object)(object)component == (Object)null || component.isSinglePage)
{
return true;
}
Character holderCharacter = ((Item)component).holderCharacter;
if ((Object)(object)holderCharacter == (Object)null || !holderCharacter.IsLocal)
{
return true;
}
SpawnerWindow.Instance?.Toggle();
return false;
}
}
[HarmonyPatch(typeof(GUIManager), "UpdateWindowStatus")]
internal static class GUIManagerWindowStatusPatch
{
private static void Postfix(GUIManager __instance)
{
SpawnerWindow instance = SpawnerWindow.Instance;
if (instance != null && instance.IsOpen)
{
__instance.windowShowingCursor = true;
__instance.windowBlockingInput = true;
}
}
}
[BepInPlugin("htk6.PeakAdminBook", "Peak Admin Book", "0.1.0")]
public class Plugin : BaseUnityPlugin
{
internal static ConfigEntry<bool> GrantBookOnSpawn;
internal static ConfigEntry<bool> ReplaceAllGuidebooks;
internal static ConfigEntry<KeyCode> ToggleKey;
internal static ConfigEntry<bool> ShowIcons;
internal static ConfigEntry<bool> DumpItemListOnLoad;
public const string Id = "htk6.PeakAdminBook";
internal static Plugin Instance { get; private set; }
internal static ManualLogSource Log { get; private set; }
public static string Name => "Peak Admin Book";
public static string Version => "0.1.0";
private void Awake()
{
//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
Instance = this;
Log = ((BaseUnityPlugin)this).Logger;
GrantBookOnSpawn = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "GrantBookOnSpawn", true, "Host only: give every player the admin guidebook when their character spawns.");
ReplaceAllGuidebooks = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "ReplaceAllGuidebooks", true, "Using any full guidebook opens the admin spawner instead of the vanilla book. Guidebook pages found in the world are never affected.");
ToggleKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("General", "ToggleKey", (KeyCode)282, "Fallback key to open/close the spawner without holding the book. Set to None to disable.");
ShowIcons = ((BaseUnityPlugin)this).Config.Bind<bool>("UI", "ShowIcons", true, "Show each item's icon next to its name in the list.");
DumpItemListOnLoad = ((BaseUnityPlugin)this).Config.Bind<bool>("Debug", "DumpItemListOnLoad", false, "Write every item name found in the ItemDatabase to the BepInEx log.");
((Component)this).gameObject.AddComponent<SpawnerWindow>();
new Harmony("htk6.PeakAdminBook").PatchAll(typeof(Plugin).Assembly);
Log.LogInfo((object)("Plugin " + Name + " v" + Version + " is loaded!"));
}
private void Update()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
if ((int)ToggleKey.Value != 0 && Input.GetKeyDown(ToggleKey.Value))
{
SpawnerWindow.Instance?.Toggle();
}
}
}
internal sealed class SpawnerWindow : MonoBehaviour
{
private const int WindowId = 24237;
private const float RowHeight = 34f;
private Rect _window = new Rect(80f, 80f, 460f, 560f);
private Vector2 _scroll;
private string _search = string.Empty;
private string _status = string.Empty;
private float _statusUntil;
private GUIStyle? _rowStyle;
private GUIStyle? _headerStyle;
internal static SpawnerWindow? Instance { get; private set; }
internal bool IsOpen { get; private set; }
private void Awake()
{
Instance = this;
}
private void OnDestroy()
{
if ((Object)(object)Instance == (Object)(object)this)
{
Instance = null;
}
}
internal void Toggle()
{
if (IsOpen)
{
Close();
}
else
{
Open();
}
}
internal void Open()
{
if (!IsOpen)
{
IsOpen = true;
if (!ItemCatalog.Ready && !ItemCatalog.Building)
{
((MonoBehaviour)this).StartCoroutine(ItemCatalog.Build());
}
}
}
internal void Close()
{
IsOpen = false;
GUI.FocusControl((string)null);
}
private void Update()
{
if (IsOpen && (Object)(object)Character.localCharacter == (Object)null)
{
Close();
}
}
private void SetStatus(string message)
{
_status = message;
_statusUntil = Time.unscaledTime + 3f;
}
private void Spawn(CatalogEntry entry)
{
Character localCharacter = Character.localCharacter;
if ((Object)(object)localCharacter == (Object)null || localCharacter.refs == null || (Object)(object)localCharacter.refs.items == (Object)null)
{
SetStatus("No character available.");
return;
}
try
{
localCharacter.refs.items.SpawnItemInHand(entry.PrefabName);
SetStatus("Spawned " + entry.DisplayName);
Plugin.Log.LogInfo((object)("Requested spawn: " + entry.PrefabName));
}
catch (Exception arg)
{
SetStatus("Failed: " + entry.DisplayName);
Plugin.Log.LogError((object)$"Spawn failed for '{entry.PrefabName}': {arg}");
}
}
private void EnsureStyles()
{
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Expected O, but got Unknown
//IL_003b: Expected O, but got Unknown
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Expected O, but got Unknown
if (_rowStyle == null)
{
_rowStyle = new GUIStyle(GUI.skin.button)
{
alignment = (TextAnchor)3,
fontSize = 13,
padding = new RectOffset(8, 8, 4, 4)
};
}
if (_headerStyle == null)
{
_headerStyle = new GUIStyle(GUI.skin.label)
{
fontSize = 11,
wordWrap = false
};
}
}
private void OnGUI()
{
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Expected O, but got Unknown
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
if (IsOpen)
{
EnsureStyles();
int depth = GUI.depth;
GUI.depth = -1000;
_window = GUI.Window(24237, _window, new WindowFunction(DrawWindow), "Admin Book — Item Spawner");
GUI.depth = depth;
}
}
private void DrawWindow(int id)
{
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_011c: Unknown result type (might be due to invalid IL or missing references)
//IL_0121: Unknown result type (might be due to invalid IL or missing references)
//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
//IL_0300: Unknown result type (might be due to invalid IL or missing references)
GUILayout.Space(4f);
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.Label("Search", _headerStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(48f) });
GUI.SetNextControlName("adminbook_search");
_search = GUILayout.TextField(_search ?? string.Empty, Array.Empty<GUILayoutOption>());
if (GUILayout.Button("X", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(26f) }))
{
_search = string.Empty;
}
GUILayout.EndHorizontal();
GUILayout.Space(4f);
if (!ItemCatalog.Ready)
{
int num = ((ItemCatalog.Total > 0) ? (ItemCatalog.Scanned * 100 / ItemCatalog.Total) : 0);
GUILayout.Label($"Loading item catalog… {num}%", _headerStyle, Array.Empty<GUILayoutOption>());
GUI.DragWindow(new Rect(0f, 0f, 10000f, 22f));
return;
}
string text = (_search ?? string.Empty).Trim();
int num2 = 0;
_scroll = GUILayout.BeginScrollView(_scroll, Array.Empty<GUILayoutOption>());
foreach (CatalogEntry entry in ItemCatalog.Entries)
{
if (text.Length <= 0 || entry.DisplayName.IndexOf(text, StringComparison.OrdinalIgnoreCase) >= 0 || entry.PrefabName.IndexOf(text, StringComparison.OrdinalIgnoreCase) >= 0)
{
num2++;
GUILayout.BeginHorizontal((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(34f) });
if (Plugin.ShowIcons.Value && (Object)(object)entry.Icon != (Object)null)
{
GUILayout.Label((Texture)(object)entry.Icon, (GUILayoutOption[])(object)new GUILayoutOption[2]
{
GUILayout.Width(28f),
GUILayout.Height(28f)
});
}
else
{
GUILayout.Space(32f);
}
if (GUILayout.Button(entry.DisplayName, _rowStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) }))
{
Spawn(entry);
}
GUILayout.EndHorizontal();
}
}
if (num2 == 0)
{
GUILayout.Label("No items match that search.", _headerStyle, Array.Empty<GUILayoutOption>());
}
GUILayout.EndScrollView();
GUILayout.Space(4f);
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.Label($"{num2}/{ItemCatalog.Entries.Count} items", _headerStyle, Array.Empty<GUILayoutOption>());
GUILayout.FlexibleSpace();
if (Time.unscaledTime < _statusUntil && _status.Length > 0)
{
GUILayout.Label(_status, _headerStyle, Array.Empty<GUILayoutOption>());
}
if (GUILayout.Button("Close", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }))
{
Close();
}
GUILayout.EndHorizontal();
GUI.DragWindow(new Rect(0f, 0f, 10000f, 22f));
}
}
}
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
{
}
}