Decompiled source of PeakTextChatScrollbar v1.0.0

plugins/YonDev.PeakTextChatScrollbar.dll

Decompiled 2 days ago
using System;
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 PeakTextChat;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
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: IgnoresAccessChecksTo("PeakTextChat")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("YonDev.PeakTextChatScrollbar")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+3c26ab1ec512c41d6619ae94f2a7d9f68e4bae8c")]
[assembly: AssemblyProduct("YonDev.PeakTextChatScrollbar")]
[assembly: AssemblyTitle("PeakTextChatScrollbar")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.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 PeakTextChatScrollbar
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("YonDev.PeakTextChatScrollbar", "PeakTextChatScrollbar", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		public class ViewportSweeper : MonoBehaviour
		{
			public RectTransform targetContent;

			private void Update()
			{
				if ((Object)(object)targetContent == (Object)null)
				{
					return;
				}
				bool flag = false;
				for (int num = ((Component)this).transform.childCount - 1; num >= 0; num--)
				{
					Transform child = ((Component)this).transform.GetChild(num);
					if ((Object)(object)child != (Object)(object)targetContent)
					{
						child.SetParent((Transform)(object)targetContent, false);
						flag = true;
					}
				}
				if (flag)
				{
					Canvas.ForceUpdateCanvases();
				}
			}
		}

		public class FixedSizeScrollbarHandler : MonoBehaviour
		{
			public Scrollbar scrollbar;

			public RectTransform handleRect;

			private void Update()
			{
				//IL_005d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0074: Unknown result type (might be due to invalid IL or missing references)
				//IL_0085: Unknown result type (might be due to invalid IL or missing references)
				//IL_0096: Unknown result type (might be due to invalid IL or missing references)
				if (!((Object)(object)scrollbar == (Object)null) && !((Object)(object)handleRect == (Object)null))
				{
					scrollbar.size = 0.25f;
					float value = scrollbar.value;
					float num = value * 0.75f;
					float num2 = num + 0.25f;
					handleRect.anchorMin = new Vector2(0f, num);
					handleRect.anchorMax = new Vector2(1f, num2);
					handleRect.offsetMin = Vector2.zero;
					handleRect.offsetMax = Vector2.zero;
				}
			}
		}

		[HarmonyPatch]
		private static class patches
		{
			[HarmonyPatch(typeof(CursorHandler), "Update")]
			[HarmonyPrefix]
			private static bool BlockCursorUpdates()
			{
				if ((Object)(object)TextChatDisplay.instance != (Object)null && TextChatDisplay.instance.isBlockingInput)
				{
					return false;
				}
				return true;
			}

			[HarmonyPatch(typeof(TextChatDisplay), "Update")]
			[HarmonyPrefix]
			private static bool Prefix(TextChatDisplay __instance)
			{
				if (__instance.isBlockingInput && (Object)(object)EventSystem.current != (Object)null)
				{
					GameObject currentSelectedGameObject = EventSystem.current.currentSelectedGameObject;
					if ((Object)(object)currentSelectedGameObject != (Object)null && currentSelectedGameObject.transform.IsChildOf(((Component)__instance).transform))
					{
						__instance.framesSinceInputBlocked = -1;
					}
				}
				return true;
			}

			[HarmonyPatch(typeof(TextChatDisplay), "Update")]
			[HarmonyPostfix]
			private static void Postfix(TextChatDisplay __instance)
			{
				//IL_009a: Unknown result type (might be due to invalid IL or missing references)
				//IL_009f: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
				if (!__instance.isBlockingInput)
				{
					return;
				}
				Cursor.lockState = (CursorLockMode)0;
				Cursor.visible = true;
				float axis = Input.GetAxis("Mouse ScrollWheel");
				if (axis == 0f)
				{
					return;
				}
				Transform val = ((Component)__instance).transform.Find("ChatLog");
				ScrollRect val2 = (((Object)(object)val != (Object)null) ? ((Component)val).GetComponent<ScrollRect>() : null);
				if ((Object)(object)val2 != (Object)null && (Object)(object)val2.content != (Object)null && (Object)(object)val2.viewport != (Object)null)
				{
					Rect rect = val2.viewport.rect;
					float height = ((Rect)(ref rect)).height;
					rect = val2.content.rect;
					float height2 = ((Rect)(ref rect)).height;
					float num = height2 - height;
					if (num > 0f)
					{
						float num2 = 60f * scrollMult.Value;
						float num3 = num2 / num;
						val2.verticalNormalizedPosition += axis * num3;
						val2.verticalNormalizedPosition = Mathf.Clamp01(val2.verticalNormalizedPosition);
					}
				}
			}

			[HarmonyPatch(typeof(TextChatDisplay), "SetupChatGUI")]
			[HarmonyPostfix]
			private static void onStart(TextChatDisplay __instance)
			{
				chatInstance = __instance;
				chatlog = ((Component)__instance).transform.Find("ChatLog");
				viewport = (((Object)(object)chatlog != (Object)null) ? chatlog.Find("Viewport") : null);
				if ((Object)(object)chatlog == (Object)null || (Object)(object)viewport == (Object)null)
				{
					Log.LogInfo((object)"chatlog or viewport is null");
					return;
				}
				__instance.maxMessages = 5000;
				AIUI();
			}
		}

		private static ConfigEntry<float> scrollMult;

		private static Harmony harmony;

		private static Transform viewport;

		private static Transform chatlog;

		private static RectTransform contentRect;

		private static ScrollRect activeScrollRect;

		private static Scrollbar activeScrollbar;

		private static TextChatDisplay chatInstance;

		private static Sprite roundedSprite;

		public const string Id = "YonDev.PeakTextChatScrollbar";

		internal static ManualLogSource Log { get; private set; }

		public static string Name => "PeakTextChatScrollbar";

		public static string Version => "1.0.0";

		private void Awake()
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			Log = ((BaseUnityPlugin)this).Logger;
			scrollMult = ((BaseUnityPlugin)this).Config.Bind<float>("Shorties", "ScrollMultiplier", 10f, (ConfigDescription)null);
			harmony = new Harmony(((Object)this).name);
			harmony.PatchAll();
			Log.LogInfo((object)("Plugin " + Name + " is loaded!"));
		}

		private void OnDestroy()
		{
			harmony.UnpatchSelf();
			Log.LogInfo((object)("Plugin " + Name + " is unloaded!"));
		}

		public static void Binds()
		{
		}

		private static Sprite GetRoundedSprite()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)roundedSprite != (Object)null)
			{
				return roundedSprite;
			}
			int num = 32;
			int num2 = 32;
			int num3 = 8;
			Texture2D val = new Texture2D(num, num2, (TextureFormat)4, false);
			Color[] array = (Color[])(object)new Color[num * num2];
			for (int i = 0; i < num2; i++)
			{
				for (int j = 0; j < num; j++)
				{
					float num4 = Mathf.Max(0f, Mathf.Abs((float)j - (float)num / 2f + 0.5f) - ((float)num / 2f - (float)num3));
					float num5 = Mathf.Max(0f, Mathf.Abs((float)i - (float)num2 / 2f + 0.5f) - ((float)num2 / 2f - (float)num3));
					float num6 = Mathf.Sqrt(num4 * num4 + num5 * num5);
					if (num6 > (float)num3)
					{
						array[i * num + j] = Color.clear;
						continue;
					}
					float num7 = Mathf.Clamp01((float)num3 - num6 + 0.5f);
					array[i * num + j] = new Color(1f, 1f, 1f, num7);
				}
			}
			val.SetPixels(array);
			val.Apply();
			Vector4 val2 = default(Vector4);
			((Vector4)(ref val2))..ctor((float)num3, (float)num3, (float)num3, (float)num3);
			roundedSprite = Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num2), new Vector2(0.5f, 0.5f), 100f, 0u, (SpriteMeshType)0, val2);
			return roundedSprite;
		}

		private static void AIUI()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: 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_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Expected O, but got Unknown
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Expected O, but got Unknown
			//IL_0364: Unknown result type (might be due to invalid IL or missing references)
			//IL_036b: Expected O, but got Unknown
			//IL_0393: Unknown result type (might be due to invalid IL or missing references)
			//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_041c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0460: Unknown result type (might be due to invalid IL or missing references)
			//IL_0467: Expected O, but got Unknown
			//IL_0487: Unknown result type (might be due to invalid IL or missing references)
			//IL_0494: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_04eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f2: Expected O, but got Unknown
			//IL_051c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0533: Unknown result type (might be due to invalid IL or missing references)
			//IL_0540: Unknown result type (might be due to invalid IL or missing references)
			//IL_054d: Unknown result type (might be due to invalid IL or missing references)
			//IL_058a: Unknown result type (might be due to invalid IL or missing references)
			RectTransform component = ((Component)viewport).GetComponent<RectTransform>();
			component.anchorMin = Vector2.zero;
			component.anchorMax = Vector2.one;
			component.offsetMin = Vector2.zero;
			component.offsetMax = Vector2.zero;
			component.pivot = new Vector2(0f, 0f);
			GameObject val = new GameObject("ScrollContent", new Type[1] { typeof(RectTransform) });
			val.transform.SetParent(viewport, false);
			contentRect = val.GetComponent<RectTransform>();
			contentRect.anchorMin = new Vector2(0f, 0f);
			contentRect.anchorMax = new Vector2(1f, 0f);
			contentRect.pivot = new Vector2(0f, 0f);
			contentRect.sizeDelta = new Vector2(0f, 0f);
			VerticalLayoutGroup component2 = ((Component)viewport).GetComponent<VerticalLayoutGroup>();
			VerticalLayoutGroup val2 = val.AddComponent<VerticalLayoutGroup>();
			if ((Object)(object)component2 != (Object)null)
			{
				((HorizontalOrVerticalLayoutGroup)val2).childControlWidth = true;
				((HorizontalOrVerticalLayoutGroup)val2).childControlHeight = false;
				((HorizontalOrVerticalLayoutGroup)val2).childForceExpandWidth = true;
				((HorizontalOrVerticalLayoutGroup)val2).childForceExpandHeight = false;
				((LayoutGroup)val2).padding = ((LayoutGroup)component2).padding;
				((HorizontalOrVerticalLayoutGroup)val2).spacing = ((HorizontalOrVerticalLayoutGroup)component2).spacing;
				((LayoutGroup)val2).childAlignment = (TextAnchor)6;
				Object.Destroy((Object)(object)component2);
			}
			for (int num = viewport.childCount - 1; num >= 0; num--)
			{
				Transform child = viewport.GetChild(num);
				if ((Object)(object)child != (Object)(object)contentRect)
				{
					child.SetParent((Transform)(object)contentRect, false);
				}
			}
			ViewportSweeper viewportSweeper = ((Component)viewport).gameObject.GetComponent<ViewportSweeper>() ?? ((Component)viewport).gameObject.AddComponent<ViewportSweeper>();
			viewportSweeper.targetContent = contentRect;
			ContentSizeFitter val3 = val.AddComponent<ContentSizeFitter>();
			val3.verticalFit = (FitMode)2;
			val3.horizontalFit = (FitMode)0;
			activeScrollRect = ((Component)chatlog).gameObject.GetComponent<ScrollRect>() ?? ((Component)chatlog).gameObject.AddComponent<ScrollRect>();
			activeScrollRect.horizontal = false;
			activeScrollRect.vertical = true;
			activeScrollRect.scrollSensitivity = 0f;
			activeScrollRect.viewport = component;
			activeScrollRect.content = contentRect;
			Image val4 = ((Component)chatlog).gameObject.GetComponent<Image>() ?? ((Component)chatlog).gameObject.AddComponent<Image>();
			((Graphic)val4).color = new Color(0f, 0f, 0f, 0.01f);
			((Graphic)val4).raycastTarget = true;
			EventTrigger val5 = ((Component)chatlog).gameObject.GetComponent<EventTrigger>() ?? ((Component)chatlog).gameObject.AddComponent<EventTrigger>();
			val5.triggers.Clear();
			Entry val6 = new Entry
			{
				eventID = (EventTriggerType)2
			};
			((UnityEvent<BaseEventData>)(object)val6.callback).AddListener((UnityAction<BaseEventData>)delegate
			{
				if ((Object)(object)chatInstance != (Object)null && (Object)(object)chatInstance.inputField != (Object)null)
				{
					EventSystem.current.SetSelectedGameObject(((Component)chatInstance.inputField).gameObject);
					chatInstance.inputField.ActivateInputField();
				}
			});
			val5.triggers.Add(val6);
			GameObject val7 = new GameObject("Scrollbar Vertical", new Type[3]
			{
				typeof(RectTransform),
				typeof(CanvasRenderer),
				typeof(Image)
			});
			val7.transform.SetParent(chatlog, false);
			RectTransform component3 = val7.GetComponent<RectTransform>();
			component3.anchorMin = new Vector2(1f, 0f);
			component3.anchorMax = new Vector2(1f, 1f);
			component3.pivot = new Vector2(1f, 1f);
			component3.sizeDelta = new Vector2(8f, 0f);
			Sprite sprite = GetRoundedSprite();
			Image component4 = val7.GetComponent<Image>();
			component4.sprite = sprite;
			component4.type = (Type)1;
			((Graphic)component4).color = new Color(0f, 0f, 0f, 0.3f);
			((Graphic)component4).raycastTarget = true;
			activeScrollbar = val7.AddComponent<Scrollbar>();
			activeScrollbar.direction = (Direction)2;
			GameObject val8 = new GameObject("Sliding Area", new Type[1] { typeof(RectTransform) });
			val8.transform.SetParent(val7.transform, false);
			RectTransform component5 = val8.GetComponent<RectTransform>();
			component5.anchorMin = Vector2.zero;
			component5.anchorMax = Vector2.one;
			component5.offsetMin = Vector2.zero;
			component5.offsetMax = Vector2.zero;
			GameObject val9 = new GameObject("Handle", new Type[3]
			{
				typeof(RectTransform),
				typeof(CanvasRenderer),
				typeof(Image)
			});
			val9.transform.SetParent(val8.transform, false);
			RectTransform component6 = val9.GetComponent<RectTransform>();
			component6.anchorMin = new Vector2(0f, 0f);
			component6.anchorMax = new Vector2(1f, 0.25f);
			component6.offsetMin = Vector2.zero;
			component6.offsetMax = Vector2.zero;
			Image component7 = val9.GetComponent<Image>();
			component7.sprite = sprite;
			component7.type = (Type)1;
			((Graphic)component7).color = new Color(0.9f, 0.9f, 0.9f, 0.85f);
			((Graphic)component7).raycastTarget = true;
			((Selectable)activeScrollbar).targetGraphic = (Graphic)(object)component7;
			FixedSizeScrollbarHandler fixedSizeScrollbarHandler = val7.AddComponent<FixedSizeScrollbarHandler>();
			fixedSizeScrollbarHandler.scrollbar = activeScrollbar;
			fixedSizeScrollbarHandler.handleRect = component6;
			activeScrollRect.verticalScrollbar = activeScrollbar;
			activeScrollRect.verticalScrollbarVisibility = (ScrollbarVisibility)0;
		}
	}
}
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
	{
	}
}