using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
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.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.InputSystem;
using pworld.Scripts.Extensions;
[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("darmuh")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.2.1.0")]
[assembly: AssemblyInformationalVersion("1.2.1+a69c57a8d32a935bbf6fe665d53ac20bddb03dcc")]
[assembly: AssemblyProduct("com.github.darmuh.PEAKTrails")]
[assembly: AssemblyTitle("PEAKTrails")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.2.1.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
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")]
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 PEAKTrails
{
internal class Misc
{
internal static List<TrailRenderer> trailsActive = new List<TrailRenderer>();
internal static IEnumerator TransitionShowColor(TrailRenderer trail, Character __instance, float start, float end)
{
if (trailsActive.Contains(trail))
{
yield break;
}
trailsActive.Add(trail);
float currentStart = trail.startColor.a;
float currentEnd = trail.endColor.a;
while (Patching.PlayerVisualUpdatePatch.ShowTrails && trail.startColor.a < start)
{
Color playerColor = __instance.refs.customization.PlayerColor;
currentStart += Time.deltaTime;
currentEnd += Time.deltaTime;
if (currentEnd > end)
{
currentEnd = end;
}
if (currentStart > start)
{
currentStart = start;
}
trail.startColor = new Color(playerColor.r, playerColor.g, playerColor.b, currentStart);
trail.endColor = new Color(playerColor.r, playerColor.g, playerColor.b, currentEnd);
yield return null;
}
}
internal static IEnumerator TransitionHideColor(TrailRenderer trail, Character __instance)
{
trailsActive.Remove(trail);
float start = trail.startColor.a;
float end = trail.endColor.a;
while (!Patching.PlayerVisualUpdatePatch.ShowTrails && trail.startColor.a > 0f)
{
Color playerColor = __instance.refs.customization.PlayerColor;
trail.startColor = new Color(playerColor.r, playerColor.g, playerColor.b, start);
trail.endColor = new Color(playerColor.r, playerColor.g, playerColor.b, end);
start -= Time.deltaTime;
end -= Time.deltaTime;
if (end < 0f)
{
end = 0f;
}
if (start < 0f)
{
start = 0f;
}
yield return null;
}
}
internal static string GetEmoteFrom(Patching.TrailAction action)
{
return action switch
{
Patching.TrailAction.Dance1Emote => "A_Scout_Emote_Dance1",
Patching.TrailAction.Dance2Emote => "A_Scout_Emote_Dance2",
Patching.TrailAction.NoNoEmote => "A_Scout_Emote_Nono",
Patching.TrailAction.SaluteEmote => "A_Scout_Emote_Salute",
Patching.TrailAction.ThinkEmote => "A_Scout_Emote_Think",
Patching.TrailAction.ThumbsUpEmote => "A_Scout_Emote_ThumbsUp",
Patching.TrailAction.CrossedArmsEmote => "A_Scout_Emote_CrossedArms",
Patching.TrailAction.PlayDeadEmote => "A_Scout_Emote_Flex",
Patching.TrailAction.ShrugEmote => "A_Scout_Emote_Shrug",
Patching.TrailAction.BackflipEmote => "A_Scout_Emote_BackFlip",
Patching.TrailAction.CinemaEmote => "A_Scout_Emote_Cinema",
Patching.TrailAction.CrashoutEmote => "A_Scout_Emote_Crashout",
Patching.TrailAction.DefeatEmote => "A_Scout_Emote_Defeat",
Patching.TrailAction.FlexEmote => "A_Scout_Emote_Flex",
Patching.TrailAction.PunchEmote => "A_Scout_Emote_PunchFist",
Patching.TrailAction.WaveEmote => "A_Scout_Emote_Wave",
_ => "NoValidEmotesDetected",
};
}
}
internal class ModConfig
{
internal static ConfigEntry<float> TrailLength { get; private set; }
internal static ConfigEntry<float> TrailStartWidth { get; private set; }
internal static ConfigEntry<float> TrailEndWidth { get; private set; }
internal static ConfigEntry<float> TrailStartAlpha { get; private set; }
internal static ConfigEntry<float> TrailEndAlpha { get; private set; }
internal static ConfigEntry<bool> ShowLocalTrail { get; private set; }
internal static ConfigEntry<Patching.ShowTrailSetting> VisibilitySetting { get; private set; }
internal static ConfigEntry<string> ToggleKey { get; set; }
internal static ConfigEntry<float> TogglePressDelay { get; private set; }
internal static ConfigEntry<Patching.TrailAction> ToggleAction { get; private set; }
internal static ConfigEntry<Patching.TrailItem> ToggleItem { get; private set; }
internal static void Init(ConfigFile config)
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: 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
//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
//IL_00db: Expected O, but got Unknown
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Expected O, but got Unknown
//IL_0177: Unknown result type (might be due to invalid IL or missing references)
//IL_0181: Expected O, but got Unknown
TrailLength = config.Bind<float>("General", "Trail Length", 360f, new ConfigDescription("This sets the length of the trail in seconds. The end of the trail will fade/disappear\nThe maximum value for this config item is 30 minutes", (AcceptableValueBase)(object)new AcceptableValueRange<float>(3f, 1800f), Array.Empty<object>()));
TrailStartWidth = config.Bind<float>("General", "Trail Start Width", 0.22f, new ConfigDescription("This sets the width of the trail line itself", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
TrailEndWidth = config.Bind<float>("General", "Trail End Width", 0f, new ConfigDescription("This sets the width of the trail line itself", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
TrailStartAlpha = config.Bind<float>("General", "Trail Start Alpha", 0.65f, new ConfigDescription("This sets the transparency of the start of the trail", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.05f, 1f), Array.Empty<object>()));
TrailEndAlpha = config.Bind<float>("General", "Trail End Alpha", 0.25f, new ConfigDescription("This sets the transparency of the end of the trail.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.05f, 1f), Array.Empty<object>()));
ShowLocalTrail = config.Bind<bool>("General", "Show Self Trail", true, "If disabled, will not render a trail for yourself (local client)");
VisibilitySetting = config.Bind<Patching.ShowTrailSetting>("General", "Visbility Setting", Patching.ShowTrailSetting.ToggleKey, "Determines how trail visibility will be handled.\r\nAlwaysOn means the trail will always be visible.\r\nToggleKey means the trail can be toggled on/off with a keybind.\r\nOnActionShow means the trail will only be visible when a player is performing a specific action.\r\nOnActionHide means the trail will always be visible except when a player is performing a specific action.\r\nOnHoldItem means the trail will be visible while holding a specific item.\r\nOnItemUseButton means the trail will be visible when a player is pressing the primary or secondary use buttons while holding a specific item.");
TogglePressDelay = config.Bind<float>("Controls", "Visibility Press Delay", 0.2f, new ConfigDescription("This sets the amount of time additional key presses will not affect trail visbility after the Visibility Toggle Key has been pressed.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 3f), Array.Empty<object>()));
ToggleAction = config.Bind<Patching.TrailAction>("Controls", "Visibility Toggle Action", Patching.TrailAction.Reach, "When Visibility Setting is set to OnAction, this action will be used to display player trails");
ToggleItem = config.Bind<Patching.TrailItem>("Controls", "Visibility Toggle Item", Patching.TrailItem.Guidebook, "When Visibility Setting is set to OnHoldItem OR OnItemUsed, this item will be used to display player trails");
}
}
internal class Patching
{
internal enum ShowTrailSetting
{
AlwaysOn,
ToggleKey,
OnActionShow,
OnActionHide,
OnHoldItem,
OnItemUseButton
}
internal enum TrailAction
{
Reach,
Crouch,
SaluteEmote,
ThumbsUpEmote,
NoNoEmote,
ThinkEmote,
PlayDeadEmote,
ShrugEmote,
CrossedArmsEmote,
Dance1Emote,
BackflipEmote,
CinemaEmote,
CrashoutEmote,
Dance2Emote,
DefeatEmote,
FlexEmote,
PunchEmote,
WaveEmote
}
internal enum TrailItem
{
Binoculars,
BingBong,
Bugle,
Coconut,
Conch,
Compass,
Flare,
Guidebook,
Lantern
}
[HarmonyPatch(typeof(Character), "Update")]
internal class PlayerVisualUpdatePatch
{
internal static bool ShowTrails;
internal static float UpdateDelay;
private static void Postfix(Character __instance)
{
if (__instance.isBot)
{
return;
}
if (__instance.IsLocal)
{
UpdateLocalTrailControls(__instance);
}
TrailRenderer val = TryGetTrailRenderer(__instance);
if (!((Behaviour)__instance.data).enabled || __instance.data.dead || (__instance.IsLocal && !ModConfig.ShowLocalTrail.Value))
{
val.emitting = false;
return;
}
if (!val.emitting)
{
val.emitting = true;
}
UpdateTrailColor(__instance, val);
}
private static void UpdateLocalTrailControls(Character __instance)
{
if (ModConfig.VisibilitySetting.Value == ShowTrailSetting.AlwaysOn)
{
AlwaysOn();
}
else if (ModConfig.VisibilitySetting.Value == ShowTrailSetting.ToggleKey)
{
KeyListener();
}
else if (ActionSettings(ModConfig.VisibilitySetting.Value))
{
ActionListener(__instance);
}
else
{
ItemListener(__instance);
}
}
private static bool ActionSettings(ShowTrailSetting setting)
{
if (setting == ShowTrailSetting.OnActionHide || setting == ShowTrailSetting.OnActionShow)
{
return true;
}
return false;
}
private static void AlwaysOn()
{
if (!ShowTrails)
{
ShowTrails = true;
}
}
private static void ActionListener(Character __instance)
{
if (ModConfig.VisibilitySetting.Value == ShowTrailSetting.OnActionShow)
{
ShowTrails = ActionShowTrail(__instance);
}
else
{
ShowTrails = !ActionShowTrail(__instance);
}
}
private static bool ActionShowTrail(Character __instance)
{
if (ModConfig.ToggleAction.Value == TrailAction.Reach)
{
return __instance.data.isReaching;
}
if (ModConfig.ToggleAction.Value == TrailAction.Crouch)
{
return __instance.data.isCrouching;
}
string emoteFrom = Misc.GetEmoteFrom(ModConfig.ToggleAction.Value);
return PExt.IsPlaying(__instance.refs.animator, emoteFrom, 0);
}
private static void ItemListener(Character __instance)
{
Item currentItem = __instance.data.currentItem;
if ((Object)(object)currentItem == (Object)null)
{
ShowTrails = false;
}
else if (IsValidItem(currentItem))
{
if (ModConfig.VisibilitySetting.Value == ShowTrailSetting.OnHoldItem)
{
ShowTrails = true;
}
else
{
ShowTrails = CharacterInput.action_usePrimary.IsPressed() || CharacterInput.action_useSecondary.IsPressed();
}
}
else
{
ShowTrails = false;
}
}
private static bool IsValidItem(Item item)
{
if ((Object)(object)item == (Object)null)
{
return false;
}
return ValidItems.Any((string x) => item.UIData.itemName.Contains(x, StringComparison.InvariantCultureIgnoreCase) && ModConfig.ToggleItem.Value == (TrailItem)ValidItems.IndexOf(x));
}
private static void KeyListener()
{
if (ModConfig.VisibilitySetting.Value == ShowTrailSetting.ToggleKey)
{
if (UpdateDelay > 0f)
{
UpdateDelay -= Time.deltaTime;
}
if (Plugin.ToggleView.IsPressed() && UpdateDelay <= 0f)
{
ShowTrails = !ShowTrails;
UpdateDelay = ModConfig.TogglePressDelay.Value;
Plugin.Log.LogMessage((object)$"Trail toggled to [ {ShowTrails} ]");
}
}
}
private static void UpdateTrailColor(Character __instance, TrailRenderer trail)
{
if (ShowTrails)
{
((MonoBehaviour)__instance).StartCoroutine(Misc.TransitionShowColor(trail, __instance, ModConfig.TrailStartAlpha.Value, ModConfig.TrailEndAlpha.Value));
}
else
{
((MonoBehaviour)__instance).StartCoroutine(Misc.TransitionHideColor(trail, __instance));
}
}
private static TrailRenderer TryGetTrailRenderer(Character __instance)
{
//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Expected O, but got Unknown
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: 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_0087: Unknown result type (might be due to invalid IL or missing references)
TrailRenderer val = default(TrailRenderer);
if (!((Component)__instance.refs.animationPositionTransform).gameObject.TryGetComponent<TrailRenderer>(ref val))
{
val = ((Component)__instance.refs.animationPositionTransform).gameObject.AddComponent<TrailRenderer>();
Color playerColor = __instance.refs.customization.PlayerColor;
val.startColor = new Color(playerColor.r, playerColor.g, playerColor.b, ModConfig.TrailStartAlpha.Value);
val.endColor = new Color(playerColor.g, playerColor.b, playerColor.a, ModConfig.TrailEndAlpha.Value);
Plugin.Log.LogDebug((object)"Trail created!");
}
((Renderer)val).material = new Material(Shader.Find("Sprites/Default"));
val.time = ModConfig.TrailLength.Value;
val.startWidth = ModConfig.TrailStartWidth.Value;
val.endWidth = ModConfig.TrailEndWidth.Value;
return val;
}
}
internal static readonly List<string> ValidItems = new List<string>(9) { "Binoculars", "Bing Bong", "Bugle", "Coconut", "Conch", "Compass", "Flare", "Guidebook", "Lantern" };
}
[BepInPlugin("com.github.darmuh.PEAKTrails", "PEAKTrails", "1.2.1")]
public class Plugin : BaseUnityPlugin
{
internal static InputAction ToggleView = new InputAction("Toggle Trail", (InputActionType)0, (string)null, (string)null, (string)null, (string)null);
internal static string LastBinding = string.Empty;
public const string Id = "com.github.darmuh.PEAKTrails";
internal static ManualLogSource Log { get; private set; } = null;
public static string Name => "PEAKTrails";
public static string Version => "1.2.1";
private void Awake()
{
Log = ((BaseUnityPlugin)this).Logger;
ModConfig.Init(((BaseUnityPlugin)this).Config);
((BaseUnityPlugin)this).Config.SettingChanged += OnSettingChanged;
Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "com.github.darmuh.PEAKTrails");
Log.LogInfo((object)("Plugin " + Name + " is loaded with version " + Version + "!"));
}
private void Start()
{
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Expected O, but got Unknown
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
ModConfig.ToggleKey = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "Visibility Toggle Key", "<Keyboard>/t", new ConfigDescription("When Visbility Setting is set to ToggleKey, this key will be used to toggle the trail visibility.\r\nSet this to a valid unity control string.\r\nA listing of possible control strings is generated on game launch.", (AcceptableValueBase)null, Array.Empty<object>()));
InputActionSetupExtensions.AddBinding(ToggleView, ModConfig.ToggleKey.Value, (string)null, (string)null, (string)null);
LastBinding = ModConfig.ToggleKey.Value;
ToggleView.Enable();
CollectionExtensions.AddItem<InputAction>((IEnumerable<InputAction>)InputSystem.actions, ToggleView);
}
private void OnDestroy()
{
Harmony.UnpatchID("com.github.darmuh.PEAKTrails");
Log.LogInfo((object)("Plugin " + Name + " unloaded!"));
}
private void OnSettingChanged(object sender, SettingChangedEventArgs settingChangedArg)
{
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
if (settingChangedArg.ChangedSetting != null && (object)settingChangedArg.ChangedSetting == ModConfig.ToggleKey)
{
BindingSyntax val = InputActionSetupExtensions.ChangeBindingWithPath(ToggleView, LastBinding);
((BindingSyntax)(ref val)).Erase();
InputActionSetupExtensions.AddBinding(ToggleView, ModConfig.ToggleKey.Value, (string)null, (string)null, (string)null);
LastBinding = ModConfig.ToggleKey.Value;
}
}
}
}
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
{
}
}