Decompiled source of DropAndGrabOverhaul v0.1.1

plugins/com.github.manvocao0271.dropandgraboverhaul.dll

Decompiled 2 hours ago
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 DropAndGrabOverhaul.Configuration;
using DropAndGrabOverhaul.Input;
using GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TMPro;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;

[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.github.manvocao0271.dropandgraboverhaul")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("0.1.1.0")]
[assembly: AssemblyInformationalVersion("0.1.1+6b5024ee203f21aa34e66924905dfb54d9cece91")]
[assembly: AssemblyProduct("com.github.manvocao0271.dropandgraboverhaul")]
[assembly: AssemblyTitle("DropAndGrabOverhaul")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.1.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 DropAndGrabOverhaul
{
	[BepInPlugin("com.github.manvocao0271.dropandgraboverhaul", "DropAndGrabOverhaul", "0.1.1")]
	public class Plugin : BaseUnityPlugin
	{
		private static Harmony? harmonyInstance;

		private static Coroutine? autoSellCoroutine;

		private static bool isPlacingOnCounter;

		public const string Id = "com.github.manvocao0271.dropandgraboverhaul";

		internal static ManualLogSource Log { get; private set; }

		public static string Name => "DropAndGrabOverhaul";

		public static string Version => "0.1.1";

		private void Awake()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			Log = ((BaseUnityPlugin)this).Logger;
			ItemBlacklist.Initialize(((BaseUnityPlugin)this).Config);
			InputConfiguration.Initialize(((BaseUnityPlugin)this).Config);
			GrabConfiguration.Initialize(((BaseUnityPlugin)this).Config);
			SellConfiguration.Initialize(((BaseUnityPlugin)this).Config);
			harmonyInstance = new Harmony("com.github.manvocao0271.dropandgraboverhaul");
			harmonyInstance.PatchAll();
			Log.LogInfo((object)("Plugin " + Name + " is loaded!"));
		}

		private void Update()
		{
			//IL_01ce: 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)
			PlayerControllerB val = StartOfRound.Instance?.localPlayerController;
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			DepositItemsDesk val2 = Object.FindObjectOfType<DepositItemsDesk>();
			bool flag = (Object)(object)val2 != (Object)null && (Object)(object)val2.triggerScript != (Object)null && (Object)(object)val.hoveringOverTrigger == (Object)(object)val2.triggerScript;
			if (SellConfiguration.AutoSellInventory && flag && InputHandler.IsDropKeyPressed() && (Object)(object)val2 != (Object)null)
			{
				if (autoSellCoroutine == null)
				{
					autoSellCoroutine = ((MonoBehaviour)this).StartCoroutine(AutoSellInventoryCoroutine(val, val2));
				}
			}
			else
			{
				if (flag && SellConfiguration.AutoSellInventory)
				{
					return;
				}
				bool flag2 = InputHandler.IsForceDropHeld();
				bool flag3 = !flag2 && InputHandler.IsDoubleTapDrop();
				if (!flag2 && !flag3)
				{
					return;
				}
				Log.LogInfo((object)(flag2 ? "Force drop detected - dropping ALL items (ignoring blacklist)" : "Double-tap drop detected - dropping all items"));
				if (val.ItemSlots == null || val.ItemSlots.Length == 0)
				{
					Log.LogInfo((object)"No item slots available");
					return;
				}
				List<GrabbableObject> list = new List<GrabbableObject>();
				for (int i = 0; i < val.ItemSlots.Length; i++)
				{
					if ((Object)(object)val.ItemSlots[i] != (Object)null)
					{
						list.Add(val.ItemSlots[i]);
					}
				}
				if (list.Count == 0)
				{
					Log.LogInfo((object)"No items to drop");
					return;
				}
				int currentItemSlot = val.currentItemSlot;
				int num = 0;
				foreach (GrabbableObject item in list)
				{
					if (!((Object)(object)item != (Object)null))
					{
						continue;
					}
					string itemName = item.itemProperties.itemName;
					int num2 = Array.IndexOf(val.ItemSlots, item);
					if (flag2 || num2 != val.currentItemSlot || !ItemBlacklist.IsBlacklisted(itemName))
					{
						if (!flag2 && ItemBlacklist.IsBlacklisted(itemName))
						{
							Log.LogInfo((object)("Skipping blacklisted item: " + itemName));
							continue;
						}
						val.SwitchToItemSlot(num2, (GrabbableObject)null);
						val.DiscardHeldObject(false, (NetworkObject)null, default(Vector3), true);
						num++;
						Log.LogInfo((object)("Dropped item: " + itemName));
					}
				}
				val.SwitchToItemSlot(currentItemSlot, (GrabbableObject)null);
				Log.LogInfo((object)$"Dropped {num} items total");
			}
		}

		private IEnumerator AutoSellInventoryCoroutine(PlayerControllerB player, DepositItemsDesk desk)
		{
			int soldCount = 0;
			for (int i = 0; i < player.ItemSlots.Length; i++)
			{
				if ((Object)(object)player.ItemSlots[i] != (Object)null && player.ItemSlots[i].itemProperties.isScrap)
				{
					string itemName = player.ItemSlots[i].itemProperties.itemName;
					if (SellConfiguration.IsSellBlacklisted(itemName))
					{
						Log.LogInfo((object)("Skipping sell-blacklisted item: " + itemName));
						continue;
					}
					player.SwitchToItemSlot(i, (GrabbableObject)null);
					isPlacingOnCounter = true;
					desk.PlaceItemOnCounter(player);
					isPlacingOnCounter = false;
					soldCount++;
					Log.LogInfo((object)("Sold item: " + itemName));
					yield return (object)new WaitForSeconds(0.2f);
				}
			}
			Log.LogInfo((object)$"Sold {soldCount} items total");
			autoSellCoroutine = null;
		}

		[HarmonyPatch(typeof(PlayerControllerB), "DiscardHeldObject")]
		[HarmonyPrefix]
		private static bool DiscardHeldObjectPrefix(PlayerControllerB __instance)
		{
			if (isPlacingOnCounter)
			{
				return true;
			}
			if (Keyboard.current != null && ((ButtonControl)Keyboard.current[(Key)21]).wasPressedThisFrame)
			{
				return false;
			}
			return true;
		}

		[HarmonyPatch(typeof(GrabbableObject), "RequireCooldown")]
		[HarmonyPrefix]
		private static bool RequireCooldownPrefix(GrabbableObject __instance, ref bool __result)
		{
			if (GrabConfiguration.RemoveGrabCooldown)
			{
				__result = false;
				return false;
			}
			return true;
		}

		[HarmonyPatch(typeof(InteractTrigger), "Interact")]
		[HarmonyPrefix]
		private static void InteractTriggerInteractPrefix(InteractTrigger __instance)
		{
			if (GrabConfiguration.RemoveGrabCooldown)
			{
				GrabbableObject componentInParent = ((Component)__instance).GetComponentInParent<GrabbableObject>();
				if ((Object)(object)componentInParent != (Object)null)
				{
					__instance.currentCooldownValue = -1f;
				}
			}
		}

		[HarmonyPatch(typeof(InteractTrigger), "Interact")]
		[HarmonyPostfix]
		private static void InteractTriggerInteractPostfix(InteractTrigger __instance)
		{
			if (GrabConfiguration.RemoveGrabCooldown)
			{
				GrabbableObject componentInParent = ((Component)__instance).GetComponentInParent<GrabbableObject>();
				if ((Object)(object)componentInParent != (Object)null)
				{
					__instance.currentCooldownValue = -1f;
				}
			}
		}

		[HarmonyPatch(typeof(InteractTrigger), "StopSpecialAnimation")]
		[HarmonyPostfix]
		private static void StopSpecialAnimationPostfix(InteractTrigger __instance)
		{
			if (GrabConfiguration.RemoveGrabCooldown)
			{
				GrabbableObject componentInParent = ((Component)__instance).GetComponentInParent<GrabbableObject>();
				if ((Object)(object)componentInParent != (Object)null)
				{
					__instance.currentCooldownValue = -1f;
				}
			}
		}

		[HarmonyPatch(typeof(InteractTrigger), "OnEnable")]
		[HarmonyPostfix]
		private static void OnEnablePostfix(InteractTrigger __instance)
		{
			if (GrabConfiguration.RemoveGrabCooldown)
			{
				GrabbableObject componentInParent = ((Component)__instance).GetComponentInParent<GrabbableObject>();
				if ((Object)(object)componentInParent != (Object)null)
				{
					__instance.currentCooldownValue = -1f;
				}
			}
		}

		[HarmonyPatch(typeof(PlayerControllerB), "BeginGrabObject")]
		[HarmonyPostfix]
		private static void BeginGrabObjectPostfix(PlayerControllerB __instance)
		{
			if (GrabConfiguration.RemoveGrabCooldown)
			{
				__instance.isGrabbingObjectAnimation = false;
			}
		}

		[HarmonyPatch(typeof(PlayerControllerB), "SetHoverTipAndCurrentInteractTrigger")]
		[HarmonyPostfix]
		private static void SetHoverTipAndCurrentInteractTriggerPostfix(PlayerControllerB __instance)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: 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 (!GrabConfiguration.RemoveGrabCooldown || !string.IsNullOrEmpty(((TMP_Text)__instance.cursorTip).text))
			{
				return;
			}
			Ray val = default(Ray);
			((Ray)(ref val))..ctor(((Component)__instance.gameplayCamera).transform.position, ((Component)__instance.gameplayCamera).transform.forward);
			RaycastHit val2 = default(RaycastHit);
			if (Physics.Raycast(val, ref val2, __instance.grabDistance, __instance.interactableObjectsMask) && ((Component)((RaycastHit)(ref val2)).collider).gameObject.layer != 8 && ((Component)((RaycastHit)(ref val2)).collider).gameObject.layer != 30 && ((Component)((RaycastHit)(ref val2)).collider).CompareTag("PhysicsProp"))
			{
				GrabbableObject component = ((Component)((RaycastHit)(ref val2)).collider).gameObject.GetComponent<GrabbableObject>();
				if ((Object)(object)component != (Object)null && !component.isHeld && !component.isPocketed)
				{
					((TMP_Text)__instance.cursorTip).text = "Grab : [E]";
					((Behaviour)__instance.cursorIcon).enabled = true;
					__instance.cursorIcon.sprite = __instance.grabItemIcon;
				}
			}
		}
	}
}
namespace DropAndGrabOverhaul.Inventory
{
	public static class InventoryAccessor
	{
		public static List<GrabbableObject> GetDroppableItems()
		{
			List<GrabbableObject> list = new List<GrabbableObject>();
			PlayerControllerB val = StartOfRound.Instance?.localPlayerController;
			if ((Object)(object)val == (Object)null)
			{
				Plugin.Log.LogWarning((object)"Could not access local player controller");
				return list;
			}
			if (val.ItemSlots == null || val.ItemSlots.Length == 0)
			{
				return list;
			}
			GrabbableObject[] itemSlots = val.ItemSlots;
			foreach (GrabbableObject val2 in itemSlots)
			{
				if (!((Object)(object)val2 == (Object)null))
				{
					list.Add(val2);
				}
			}
			return list;
		}
	}
}
namespace DropAndGrabOverhaul.Input
{
	public static class InputHandler
	{
		private static float lastDropKeyPressTime = -999f;

		private static float dropKeyHoldStartTime = -999f;

		private static int dropKeyPressCount = 0;

		public static bool IsDoubleTapDrop()
		{
			//IL_0011: 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)
			if (Keyboard.current == null)
			{
				return false;
			}
			float doubleTapWindow = InputConfiguration.DoubleTapWindow;
			Key val = (Key)21;
			if (((ButtonControl)Keyboard.current[val]).wasPressedThisFrame)
			{
				float num = Time.time - lastDropKeyPressTime;
				if (num < doubleTapWindow)
				{
					dropKeyPressCount++;
					if (dropKeyPressCount >= 2)
					{
						lastDropKeyPressTime = -999f;
						dropKeyPressCount = 0;
						return true;
					}
				}
				else
				{
					dropKeyPressCount = 1;
					lastDropKeyPressTime = Time.time;
				}
			}
			if (Time.time - lastDropKeyPressTime > doubleTapWindow)
			{
				dropKeyPressCount = 0;
			}
			return false;
		}

		public static bool IsForceDropHeld()
		{
			//IL_000b: 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)
			if (Keyboard.current == null)
			{
				return false;
			}
			Key val = (Key)21;
			float forceDropHoldDuration = InputConfiguration.ForceDropHoldDuration;
			if (((ButtonControl)Keyboard.current[val]).isPressed)
			{
				if (dropKeyHoldStartTime < 0f)
				{
					dropKeyHoldStartTime = Time.time;
				}
				float num = Time.time - dropKeyHoldStartTime;
				if (num >= forceDropHoldDuration)
				{
					return true;
				}
			}
			else
			{
				dropKeyHoldStartTime = -999f;
			}
			return false;
		}

		public static bool IsDropKeyPressed()
		{
			if (Keyboard.current == null)
			{
				return false;
			}
			return ((ButtonControl)Keyboard.current[(Key)21]).isPressed;
		}
	}
}
namespace DropAndGrabOverhaul.Configuration
{
	public static class GrabConfiguration
	{
		private static ConfigEntry<bool> removeGrabCooldownConfig;

		public static bool RemoveGrabCooldown { get; private set; }

		public static void Initialize(ConfigFile config)
		{
			removeGrabCooldownConfig = config.Bind<bool>("Grab", "RemoveGrabCooldown", true, "Removes the cooldown delay between grabbing items from the ground.");
			RemoveGrabCooldown = removeGrabCooldownConfig.Value;
			Plugin.Log.LogInfo((object)$"Remove grab cooldown: {RemoveGrabCooldown}");
		}
	}
	public static class InputConfiguration
	{
		private static ConfigEntry<float> doubleTapWindowConfig;

		private static ConfigEntry<float> forceDropHoldDurationConfig;

		public static float DoubleTapWindow { get; private set; }

		public static float ForceDropHoldDuration { get; private set; }

		public static void Initialize(ConfigFile config)
		{
			doubleTapWindowConfig = config.Bind<float>("Input", "DoubleTapWindow", 0.2f, "Time window in seconds to detect double-tap on drop key.");
			forceDropHoldDurationConfig = config.Bind<float>("Input", "ForceDropHoldDuration", 0.5f, "Hold drop key for this many seconds to force drop all items, ignoring blacklisted items.");
			DoubleTapWindow = doubleTapWindowConfig.Value;
			ForceDropHoldDuration = forceDropHoldDurationConfig.Value;
			Plugin.Log.LogInfo((object)$"Double-tap window set to {DoubleTapWindow}s");
			Plugin.Log.LogInfo((object)$"Force drop hold duration set to {ForceDropHoldDuration}s");
		}
	}
	public static class ItemBlacklist
	{
		private static ConfigEntry<string> blacklistedItemsConfig = null;

		private static HashSet<string> blacklistedItems = new HashSet<string>();

		public static void Initialize(ConfigFile config)
		{
			blacklistedItemsConfig = config.Bind<string>("Items", "BlacklistedItems", "Walkie-talkie, Flashlight, Shovel, Lockpicker, Pro-flashlight, Stun grenade, Boombox, TZP-Inhalant, Zap gun, Jetpack, Extension Ladder, Radar-booster, Spray paint, Weed killer, Belt bag, Kitchen knife, Shotgun, Ammo, Key", "Comma-separated list of item names that should NOT be dropped (Walkie-talkie, Flashlight, Shovel, etc.)");
			RefreshBlacklist();
		}

		public static void RefreshBlacklist()
		{
			blacklistedItems.Clear();
			if (string.IsNullOrWhiteSpace(blacklistedItemsConfig.Value))
			{
				return;
			}
			string[] array = blacklistedItemsConfig.Value.Split(',');
			string[] array2 = array;
			foreach (string text in array2)
			{
				string text2 = text.Trim();
				if (!string.IsNullOrEmpty(text2))
				{
					blacklistedItems.Add(text2);
				}
			}
			Plugin.Log.LogInfo((object)string.Format("Loaded {0} blacklisted items: {1}", blacklistedItems.Count, string.Join(", ", blacklistedItems)));
		}

		public static bool IsBlacklisted(string itemName)
		{
			bool flag = blacklistedItems.Contains(itemName);
			if (flag)
			{
				Plugin.Log.LogInfo((object)("Item '" + itemName + "' is blacklisted"));
			}
			return flag;
		}

		public static HashSet<string> GetBlacklistedItems()
		{
			return new HashSet<string>(blacklistedItems);
		}
	}
	public static class SellConfiguration
	{
		private static ConfigEntry<bool> autoSellInventoryConfig = null;

		private static ConfigEntry<string> sellBlacklistConfig = null;

		private static HashSet<string> sellBlacklistedItems = new HashSet<string>();

		public static bool AutoSellInventory { get; private set; }

		public static void Initialize(ConfigFile config)
		{
			autoSellInventoryConfig = config.Bind<bool>("Sell", "AutoSellInventory", true, "Holding the drop key while at the company counter will automatically sell all items in the inventory.");
			sellBlacklistConfig = config.Bind<string>("Sell", "SellBlacklistedItems", "Walkie-talkie, Flashlight, Shovel, Lockpicker, Pro-flashlight, Stun grenade, Boombox, TZP-Inhalant, Zap gun, Jetpack, Extension Ladder, Radar-booster, Spray paint, Weed killer, Belt bag, Kitchen knife, Shotgun, Ammo, Key", "Comma-separated list of item names that should NOT be automatically sold by the auto-sell feature.");
			AutoSellInventory = autoSellInventoryConfig.Value;
			Plugin.Log.LogInfo((object)$"Auto sell inventory: {AutoSellInventory}");
			RefreshSellBlacklist();
		}

		public static void RefreshSellBlacklist()
		{
			sellBlacklistedItems.Clear();
			if (string.IsNullOrWhiteSpace(sellBlacklistConfig.Value))
			{
				return;
			}
			string[] array = sellBlacklistConfig.Value.Split(',');
			string[] array2 = array;
			foreach (string text in array2)
			{
				string text2 = text.Trim();
				if (!string.IsNullOrEmpty(text2))
				{
					sellBlacklistedItems.Add(text2);
				}
			}
			Plugin.Log.LogInfo((object)string.Format("Loaded {0} sell-blacklisted items: {1}", sellBlacklistedItems.Count, string.Join(", ", sellBlacklistedItems)));
		}

		public static bool IsSellBlacklisted(string itemName)
		{
			return sellBlacklistedItems.Contains(itemName);
		}
	}
}
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
	{
		internal 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
	{
	}
}