Decompiled source of NegativeAscents v1.0.0

JesperAnimations.NegativeAscents.dll

Decompiled 2 months ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("JesperAnimations.NegativeAscents")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyInformationalVersion("0.1.0")]
[assembly: AssemblyProduct("JesperAnimations.NegativeAscents")]
[assembly: AssemblyTitle("Negative Ascents")]
[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;
		}
	}
}
[BepInPlugin("JesperAnimations.NegativeAscents", "Negative Ascents", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	[HarmonyPatch(typeof(BoardingPass), "UpdateAscent")]
	public static class BoardingPassUpdatePatch
	{
		private static void Postfix(BoardingPass __instance)
		{
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			if (IsNegativeAscent)
			{
				__instance.ascentTitle.text = GetNegativeTitle();
				__instance.ascentDesc.text = GetNegativeDescription();
				__instance.reward.gameObject.SetActive(false);
				((Selectable)__instance.incrementAscentButton).interactable = true;
				((Selectable)__instance.decrementAscentButton).interactable = NegativeAscent > -8;
				((Graphic)__instance.ascentTitle).color = __instance.defaultColor;
			}
			else if (__instance.ascentIndex == -1 && !RunSettings.IsCustomRun)
			{
				((Selectable)__instance.decrementAscentButton).interactable = true;
			}
		}
	}

	[HarmonyPatch(typeof(BoardingPass), "DecrementAscent")]
	public static class BoardingPassDecrementPatch
	{
		private static bool Prefix(BoardingPass __instance)
		{
			if (IsNegativeAscent)
			{
				if (NegativeAscent > -8)
				{
					NegativeAscent--;
					__instance.ascentIndex = -1;
					Traverse.Create((object)__instance).Method("UpdateAscent", Array.Empty<object>()).GetValue();
					return false;
				}
				return false;
			}
			if (__instance.ascentIndex == -1)
			{
				NegativeMode = true;
				NegativeAscent = -1;
				__instance.ascentIndex = -1;
				Traverse.Create((object)__instance).Method("UpdateAscent", Array.Empty<object>()).GetValue();
				return false;
			}
			return true;
		}
	}

	[HarmonyPatch(typeof(BoardingPass), "IncrementAscent")]
	public static class BoardingPassIncrementPatch
	{
		private static bool Prefix(BoardingPass __instance)
		{
			if (!IsNegativeAscent)
			{
				return true;
			}
			if (NegativeAscent == -1)
			{
				NegativeMode = false;
				__instance.ascentIndex = -1;
				Traverse.Create((object)__instance).Method("UpdateAscent", Array.Empty<object>()).GetValue();
				return false;
			}
			NegativeAscent++;
			__instance.ascentIndex = -1;
			Traverse.Create((object)__instance).Method("UpdateAscent", Array.Empty<object>()).GetValue();
			return false;
		}
	}

	[HarmonyPatch(typeof(BoardingPass), "StartGame")]
	public static class BoardingPassStartGamePatch
	{
		private static bool Prefix(BoardingPass __instance)
		{
			if (!IsNegativeAscent)
			{
				return true;
			}
			__instance.kiosk.StartGame(0);
			return false;
		}
	}

	[HarmonyPatch(typeof(AirportCheckInKiosk), "BeginIslandLoadRPC")]
	public static class BeginIslandLoadPatch
	{
		private static void Postfix()
		{
			if (IsNegativeAscent)
			{
			}
		}
	}

	[HarmonyPatch(typeof(AscentUI), "Start")]
	public static class NegativeAscentUIPatch
	{
		private static void Postfix(AscentUI __instance)
		{
			if (IsNegativeAscent)
			{
				((TMP_Text)__instance.text).text = "ASCENT " + NegativeAscent;
			}
		}
	}

	[HarmonyPatch(typeof(CharacterAfflictions), "UpdateNormalStatuses")]
	public static class NegativeInjuryPatch
	{
		private static void Postfix(CharacterAfflictions __instance)
		{
			if (!IsNegativeAscent || NegativeAscent > -2 || IsCharacterInAirport(__instance) || !((MonoBehaviourPun)__instance).photonView.IsMine)
			{
				return;
			}
			float currentStatus = __instance.GetCurrentStatus((STATUSTYPE)0);
			if (!(currentStatus <= 0f))
			{
				float num = __instance.LastAddedStatus((STATUSTYPE)0);
				if (!(Time.time - num <= 25f))
				{
					__instance.SubtractStatus((STATUSTYPE)0, InjuryRegenRate.Value * Time.deltaTime, false, true);
				}
			}
		}
	}

	[HarmonyPatch(typeof(Ascents), "get_hungerRateMultiplier")]
	public static class HungerMultiplierPatch
	{
		private static void Postfix(ref float __result)
		{
			if (IsNegativeAscent && NegativeAscent < -1 && !IsLocalCharacterInAirport())
			{
				__result = HungerMultiplier.Value;
			}
		}
	}

	[HarmonyPatch(typeof(CharacterAfflictions), "UpdateWeight")]
	public static class NegativeWeightPatch
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			MethodInfo carryWeightGetter = AccessTools.PropertyGetter(typeof(Item), "CarryWeight");
			foreach (CodeInstruction instruction in instructions)
			{
				yield return instruction;
				if (CodeInstructionExtensions.Calls(instruction, carryWeightGetter))
				{
					yield return new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(NegativeWeightPatch), "ModifyWeight", (Type[])null, (Type[])null));
				}
			}
		}

		public static int ModifyWeight(int weight)
		{
			if (!IsNegativeAscent || NegativeAscent > -2 || IsLocalCharacterInAirport())
			{
				return weight;
			}
			return Math.Max(0, weight - WeightReduction.Value);
		}
	}

	[HarmonyPatch(typeof(CharacterAfflictions), "UpdateNormalStatuses")]
	public static class A4DaytimeAfflictionPatch
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			MethodInfo cooldownMethod = AccessTools.Method(typeof(Plugin), "A4Cooldown", (Type[])null, (Type[])null);
			MethodInfo reductionMethod = AccessTools.Method(typeof(Plugin), "A4Reduction", (Type[])null, (Type[])null);
			foreach (CodeInstruction instruction in instructions)
			{
				if (instruction.opcode == OpCodes.Ldfld)
				{
					FieldInfo field = instruction.operand as FieldInfo;
					if (field != null && (field.Name == "poisonReductionCooldown" || field.Name == "sporesReductionCooldown" || field.Name == "hotReductionCooldown" || field.Name == "drowsyReductionCooldown"))
					{
						yield return instruction;
						yield return new CodeInstruction(OpCodes.Call, (object)cooldownMethod);
						continue;
					}
					if (field != null && (field.Name == "poisonReductionPerSecond" || field.Name == "sporesReductionPerSecond" || field.Name == "hotReductionPerSecond" || field.Name == "drowsyReductionPerSecond"))
					{
						yield return instruction;
						yield return new CodeInstruction(OpCodes.Call, (object)reductionMethod);
						continue;
					}
				}
				yield return instruction;
			}
		}
	}

	[HarmonyPatch(typeof(CharacterAfflictions), "AddStatus")]
	public static class A5TemperaturePatch
	{
		private static void Prefix(CharacterAfflictions __instance, STATUSTYPE statusType, ref float amount, bool fromRPC)
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Invalid comparison between Unknown and I4
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Invalid comparison between Unknown and I4
			if (IsNegativeAscent && NegativeAscent <= -5 && !IsCharacterInAirport(__instance) && ((int)statusType == 2 || (int)statusType == 8) && !fromRPC && amount > 0f)
			{
				amount *= TemperatureGainMultiplier.Value;
			}
		}
	}

	[HarmonyPatch(typeof(OrbFogHandler), "Move")]
	public static class A5FogPatch
	{
		private static bool Prefix()
		{
			if (!IsNegativeAscent || NegativeAscent > -5)
			{
				return true;
			}
			return false;
		}
	}

	[HarmonyPatch(typeof(GUIManager), "TheFogRises")]
	public static class A5FogTextPatch
	{
		private static bool Prefix()
		{
			if (IsNegativeAscent && NegativeAscent <= -5)
			{
				return false;
			}
			return true;
		}
	}

	[HarmonyPatch(typeof(Ascents), "get_climbStaminaMultiplier")]
	public static class NegativeClimbStaminaPatch
	{
		private static void Postfix(ref float __result)
		{
			if (IsNegativeAscent && NegativeAscent <= -6 && !IsLocalCharacterInAirport())
			{
				__result = ClimbStaminaMultiplier.Value;
			}
		}
	}

	[HarmonyPatch(typeof(Character), "UpdateVariablesFixed")]
	public static class NegativeExtraStaminaRegen
	{
		private static void Postfix(Character __instance)
		{
			if (IsNegativeAscent && NegativeAscent <= -6 && !((Object)(object)__instance == (Object)null) && __instance.refs != null && !((Object)(object)__instance.refs.afflictions == (Object)null) && !IsCharacterInAirport(__instance.refs.afflictions) && __instance.view.IsMine && !(__instance.data.extraStamina >= 1f))
			{
				float num = ((__instance.data.currentStamina > 0f) ? 1f : 2f);
				if (!(__instance.data.sinceUseStamina < num) && (!(__instance.data.sinceGrounded > 0.2f) || __instance.refs.afflictions.isWebbed))
				{
					CharacterData data = __instance.data;
					data.extraStamina += Time.fixedDeltaTime * ExtraStaminaRegenRate.Value;
					__instance.data.extraStamina = Mathf.Clamp(__instance.data.extraStamina, 0f, 1f);
					GUIManager.instance.bar.ChangeBar();
				}
			}
		}
	}

	[HarmonyPatch(typeof(Item), "Awake")]
	public static class A7ItemHookPatch
	{
		private static void Postfix(Item __instance)
		{
			if (IsNegativeAscent && NegativeAscent <= -7 && !((Object)(object)__instance == (Object)null) && !hookedCurseItems.Contains(__instance))
			{
				__instance.OnPrimaryFinishedCast = (Action)Delegate.Combine(__instance.OnPrimaryFinishedCast, new Action(OnCurseItemUsed));
				hookedCurseItems.Add(__instance);
			}
		}
	}

	[HarmonyPatch(typeof(Item), "OnDestroy")]
	public static class A7ItemDestroyPatch
	{
		private static void Prefix(Item __instance)
		{
			if (!((Object)(object)__instance == (Object)null))
			{
				hookedCurseItems.Remove(__instance);
			}
		}
	}

	[HarmonyPatch(typeof(CharacterAfflictions), "UpdateNormalStatuses")]
	public static class NegativePetrifyPatch
	{
		private static float petrifyHealTimer;

		private static float lastPetrify;

		private static float petrifyCooldownTimer;

		private static void Postfix(CharacterAfflictions __instance)
		{
			if (!IsNegativeAscent || NegativeAscent != -8 || IsCharacterInAirport(__instance) || !((MonoBehaviourPun)__instance).photonView.IsMine || (Object)(object)Character.localCharacter == (Object)null)
			{
				return;
			}
			int petrifyAmount = Character.localCharacter.data.petrifyAmount;
			if (petrifyAmount <= 0)
			{
				petrifyHealTimer = 0f;
				petrifyCooldownTimer = 0f;
				lastPetrify = 0f;
				return;
			}
			if ((float)petrifyAmount > lastPetrify)
			{
				petrifyCooldownTimer = 0f;
				petrifyHealTimer = 0f;
			}
			lastPetrify = petrifyAmount;
			if (petrifyCooldownTimer < 10f)
			{
				petrifyCooldownTimer += Time.deltaTime;
				return;
			}
			petrifyHealTimer += Time.deltaTime;
			if (petrifyHealTimer >= 2f)
			{
				int num = Mathf.Min(2, petrifyAmount);
				__instance.AddPetrify(-num);
				petrifyHealTimer = 0f;
			}
		}
	}

	public static Plugin Instance;

	public static ConfigEntry<float> InjuryRegenRate;

	public static ConfigEntry<float> HungerMultiplier;

	public static ConfigEntry<int> WeightReduction;

	public static ConfigEntry<float> DaytimeRecoveryMultiplier;

	public static ConfigEntry<float> TemperatureGainMultiplier;

	public static ConfigEntry<float> ClimbStaminaMultiplier;

	public static ConfigEntry<float> ExtraStaminaRegenRate;

	public static bool NegativeMode = false;

	public static int NegativeAscent = -1;

	private static readonly FieldInfo AirportField = AccessTools.Field(typeof(CharacterAfflictions), "m_inAirport");

	private static readonly HashSet<Item> hookedCurseItems = new HashSet<Item>();

	public static bool IsNegativeAscent => NegativeMode && NegativeAscent <= -1 && NegativeAscent >= -8;

	public static bool IsCharacterInAirport(CharacterAfflictions afflictions)
	{
		if ((Object)(object)afflictions == (Object)null || AirportField == null)
		{
			return false;
		}
		try
		{
			return (bool)AirportField.GetValue(afflictions);
		}
		catch
		{
			return false;
		}
	}

	public static bool IsLocalCharacterInAirport()
	{
		Character localCharacter = Character.localCharacter;
		if ((Object)(object)localCharacter == (Object)null)
		{
			return false;
		}
		return IsCharacterInAirport(localCharacter.refs.afflictions);
	}

	public void Awake()
	{
		//IL_0115: Unknown result type (might be due to invalid IL or missing references)
		//IL_011b: Expected O, but got Unknown
		Instance = this;
		InjuryRegenRate = ((BaseUnityPlugin)this).Config.Bind<float>("A-1", "Injury regeneration rate", 0.0075f, "How quickly injuries naturally regenerate.");
		HungerMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("A-2", "Hunger multiplier", 0.7f, "Hunger gain multiplier. Lower values mean hunger grows slower.");
		WeightReduction = ((BaseUnityPlugin)this).Config.Bind<int>("A-3", "Weight reduction", 1, "How much item weight is reduced.");
		DaytimeRecoveryMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("A-4", "Daytime recovery multiplier", 2f, "Multiplier for status recovery during daytime. 2 = twice as fast.");
		TemperatureGainMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("A-5", "Temperature gain multiplier", 0.75f, "Multiplier for heat and cold gain. Lower values mean slower buildup.");
		ClimbStaminaMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("A-6", "Climbing stamina multiplier", 0.7f, "Multiplier for climbing stamina usage. Lower values mean less stamina used.");
		ExtraStaminaRegenRate = ((BaseUnityPlugin)this).Config.Bind<float>("A-6", "Extra stamina regeneration rate", 0.01f, "How quickly extra stamina regenerates.");
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Finished loading Negative Ascents!");
		Harmony val = new Harmony("JesperAnimations.NegativeAscents");
		val.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Negative Ascent patches applied!");
	}

	public static string GetNegativeTitle()
	{
		return "ASCENT " + NegativeAscent;
	}

	public static string GetNegativeDescription()
	{
		string text = NegativeAscent switch
		{
			-1 => "YOUR INJURIES REGENERATE NATURALLY.", 
			-2 => "HUNGER GROWS SLOWER.", 
			-3 => "ITEMS HAVE DECREASED WEIGHT.", 
			-4 => "AFFLICTIONS HEAL QUICKER DURING THE DAY.", 
			-5 => "COLD/HEAT GAIN IS REDUCED. THE FOG NO LONGER RISES.", 
			-6 => "CLIMBING STAMINA USAGE IS DECREASED. EXTRA STAMINA REGENERATES OVER TIME.", 
			-7 => "CURSE CAN BE HEALED.", 
			-8 => "PETRIFY REDUCES OVER TIME.", 
			_ => "", 
		};
		if (NegativeAscent <= -2)
		{
			text += "\n\n<alpha=#CC><size=70%>And all next modifiers.";
		}
		return text;
	}

	private static float A4Cooldown(float cooldown)
	{
		if (!IsNegativeAscent || NegativeAscent > -4 || IsLocalCharacterInAirport())
		{
			return cooldown;
		}
		if ((Object)(object)DayNightManager.instance == (Object)null || DayNightManager.instance.isDay < 0.5f)
		{
			return cooldown;
		}
		float num = Mathf.Max(0.01f, DaytimeRecoveryMultiplier.Value);
		return cooldown / num;
	}

	private static float A4Reduction(float reduction)
	{
		if (!IsNegativeAscent || NegativeAscent > -4 || IsLocalCharacterInAirport())
		{
			return reduction;
		}
		if ((Object)(object)DayNightManager.instance == (Object)null || DayNightManager.instance.isDay < 0.5f)
		{
			return reduction;
		}
		return reduction * Mathf.Max(0f, DaytimeRecoveryMultiplier.Value);
	}

	private static void HookCurseItems()
	{
		if (!IsNegativeAscent || NegativeAscent > -7)
		{
			return;
		}
		Item[] array = Object.FindObjectsOfType<Item>();
		Item[] array2 = array;
		foreach (Item val in array2)
		{
			if (!((Object)(object)val == (Object)null) && !hookedCurseItems.Contains(val))
			{
				val.OnPrimaryFinishedCast = (Action)Delegate.Combine(val.OnPrimaryFinishedCast, new Action(OnCurseItemUsed));
				hookedCurseItems.Add(val);
			}
		}
	}

	private static void OnCurseItemUsed()
	{
		if (!IsNegativeAscent || NegativeAscent > -7)
		{
			return;
		}
		Character localCharacter = Character.localCharacter;
		if ((Object)(object)localCharacter == (Object)null || (Object)(object)localCharacter.refs.afflictions == (Object)null || IsCharacterInAirport(localCharacter.refs.afflictions))
		{
			return;
		}
		CharacterAfflictions afflictions = localCharacter.refs.afflictions;
		Item currentItem = localCharacter.data.currentItem;
		if (!((Object)(object)currentItem == (Object)null))
		{
			string name = ((Object)((Component)currentItem).gameObject).name;
			if (name.Contains("FirstAidKit"))
			{
				afflictions.SubtractStatus((STATUSTYPE)5, 0.1f, false, false);
			}
			else if (name.Contains("Bandages"))
			{
				afflictions.SubtractStatus((STATUSTYPE)5, 0.04f, false, false);
			}
			else if (name.Contains("CureAll"))
			{
				afflictions.SubtractStatus((STATUSTYPE)5, 4f, false, false);
			}
		}
	}
}
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 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
	{
	}
}