using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.SceneManagement;
using YAPYAP;
using YapLocalizer;
[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("com.omniscye.morecolors")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.5.0")]
[assembly: AssemblyInformationalVersion("1.0.5+15f45a0037c656f65d7bcb761880a2a9faebab63")]
[assembly: AssemblyProduct("com.omniscye.morecolors")]
[assembly: AssemblyTitle("MoreColors")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.5.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.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]
[Microsoft.CodeAnalysis.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]
[Microsoft.CodeAnalysis.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 MoreColors
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.omniscye.morecolors", "MoreColors", "1.0.5")]
public class MoreColorsPlugin : BaseUnityPlugin
{
private static bool _injected = false;
public static List<Costume> CachedCostumes = new List<Costume>();
private static List<ModLocalizedText> CachedLocals = new List<ModLocalizedText>();
public static Dictionary<string, Material> CostumeMaterialOverrides = new Dictionary<string, Material>();
private static Dictionary<string, AssetBundle> LoadedBundles = new Dictionary<string, AssetBundle>();
private static HashSet<string> UsedDisplayNames = new HashSet<string>(StringComparer.Ordinal);
public const string Id = "com.omniscye.morecolors";
public static string Name => "MoreColors";
public static string Version => "1.0.5";
private void Awake()
{
//IL_0295: Unknown result type (might be due to invalid IL or missing references)
Debug.Log((object)"[MoreColors] Initializing... Scanning for Custom Colors.");
List<string> list = new List<string>();
foreach (string item in from f in Directory.GetFiles(Paths.PluginPath, "konami_code.txt", SearchOption.AllDirectories)
orderby f
select f)
{
list.Add(item);
}
string[] array = list.ToArray();
Debug.Log((object)$"[MoreColors] Found {array.Length} configuration files.");
string[] array2 = array;
foreach (string text in array2)
{
try
{
Debug.Log((object)("[MoreColors] Processing file: " + text));
string[] array3 = File.ReadAllLines(text);
string directoryName = Path.GetDirectoryName(text);
string text2 = string.Empty;
string text3 = string.Empty;
string text4 = string.Empty;
string text5 = string.Empty;
string text6 = string.Empty;
string text7 = string.Empty;
List<KeyValuePair<SystemLanguage, string>> list2 = new List<KeyValuePair<SystemLanguage, string>>();
string[] array4 = array3;
for (int j = 0; j < array4.Length; j++)
{
string text8 = array4[j].Trim();
if (string.IsNullOrEmpty(text8) || !text8.Contains(":"))
{
bool num = !string.IsNullOrEmpty(text3) && !string.IsNullOrEmpty(text2);
bool flag = !string.IsNullOrEmpty(text4);
bool flag2 = !string.IsNullOrEmpty(text5) && !string.IsNullOrEmpty(text6);
string text9 = text3 + text4 + text6;
if (num && (flag || flag2) && text7 != text9)
{
ProcessCostume(text3, text2, text4, text5, text6, directoryName, list2);
text7 = text9;
}
text3 = string.Empty;
text4 = string.Empty;
text5 = string.Empty;
text6 = string.Empty;
list2 = new List<KeyValuePair<SystemLanguage, string>>();
continue;
}
string text10 = text8.Substring(0, text8.IndexOf(':')).Trim();
string current = text8;
int num2 = text8.IndexOf(':') + 1;
string text11 = current.Substring(num2, current.Length - num2).Trim();
if (text10.Equals("Author", StringComparison.OrdinalIgnoreCase))
{
text2 = text11;
}
else if (text10.Equals("Name", StringComparison.OrdinalIgnoreCase))
{
text3 = text11;
}
else if (text10.Equals("FileName", StringComparison.OrdinalIgnoreCase))
{
text4 = text11;
}
else if (text10.Equals("AssetBundle", StringComparison.OrdinalIgnoreCase))
{
text5 = text11;
}
else if (text10.Equals("Material", StringComparison.OrdinalIgnoreCase))
{
text6 = text11;
}
else if (text10.Contains("Local", StringComparison.OrdinalIgnoreCase))
{
if (Enum.TryParse<SystemLanguage>(text10.Replace("-Local", ""), out SystemLanguage result))
{
list2.Add(new KeyValuePair<SystemLanguage, string>(result, text11));
}
else
{
((BaseUnityPlugin)this).Logger.LogWarning((object)("Unable to assign localization for " + text8));
}
}
}
if (!string.IsNullOrEmpty(text3) && !string.IsNullOrEmpty(text2))
{
bool num3 = !string.IsNullOrEmpty(text4);
bool flag3 = !string.IsNullOrEmpty(text5) && !string.IsNullOrEmpty(text6);
string text12 = text3 + text4 + text6;
if ((num3 || flag3) && text7 != text12)
{
ProcessCostume(text3, text2, text4, text5, text6, directoryName, list2);
}
}
}
catch (Exception arg)
{
Debug.LogError((object)$"[MoreColors] Error loading file {text}: {arg}");
}
}
((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
SceneManager.sceneLoaded += OnSceneLoaded;
Harmony.CreateAndPatchAll(typeof(MoreColorsPlugin), (string)null);
InjectIntoAllLibraries();
}
private void OnDestroy()
{
SceneManager.sceneLoaded -= OnSceneLoaded;
}
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
_injected = false;
InjectIntoAllLibraries();
}
private static void InjectIntoAllLibraries()
{
if (_injected || CachedCostumes == null || CachedCostumes.Count == 0)
{
return;
}
HashSet<CostumeLibrarySO> hashSet = new HashSet<CostumeLibrarySO>();
if ((Object)(object)UIManager.Instance != (Object)null && (Object)(object)UIManager.Instance.costumeLibrary != (Object)null)
{
hashSet.Add(UIManager.Instance.costumeLibrary);
}
PawnMaterial[] array = Resources.FindObjectsOfTypeAll<PawnMaterial>();
foreach (PawnMaterial val in array)
{
if ((Object)(object)val != (Object)null && (Object)(object)val.costumeLibrary != (Object)null)
{
hashSet.Add(val.costumeLibrary);
}
}
CostumeLibrarySO[] array2 = Resources.FindObjectsOfTypeAll<CostumeLibrarySO>();
foreach (CostumeLibrarySO val2 in array2)
{
if ((Object)(object)val2 != (Object)null)
{
hashSet.Add(val2);
}
}
int num = 0;
foreach (CostumeLibrarySO item in hashSet)
{
if ((Object)(object)item == (Object)null || item.costumes == null)
{
continue;
}
HashSet<string> hashSet2 = new HashSet<string>(StringComparer.Ordinal);
for (int k = 0; k < item.costumes.Length; k++)
{
Costume val3 = item.costumes[k];
if (val3 != null && !string.IsNullOrEmpty(val3.localisationKey))
{
hashSet2.Add(val3.localisationKey);
}
}
List<Costume> list = new List<Costume>(item.costumes.Length + CachedCostumes.Count);
list.AddRange(item.costumes);
int num2 = 0;
for (int l = 0; l < CachedCostumes.Count; l++)
{
Costume val4 = CachedCostumes[l];
if (val4 != null && !string.IsNullOrEmpty(val4.localisationKey) && hashSet2.Add(val4.localisationKey))
{
list.Add(val4);
num2++;
}
}
if (num2 > 0)
{
item.costumes = list.ToArray();
num += num2;
}
}
if (num > 0)
{
Debug.Log((object)$"[MoreColors] Injected {num} custom colors into CostumeLibraries.");
}
_injected = true;
}
private void ProcessCostume(string colorName, string authorName, string imageName, string bundleName, string materialName, string folder, List<KeyValuePair<SystemLanguage, string>> locals)
{
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Expected O, but got Unknown
//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
//IL_0155: Unknown result type (might be due to invalid IL or missing references)
//IL_0186: Unknown result type (might be due to invalid IL or missing references)
//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
//IL_02c7: Expected O, but got Unknown
//IL_0223: Unknown result type (might be due to invalid IL or missing references)
//IL_0228: Unknown result type (might be due to invalid IL or missing references)
//IL_0234: Unknown result type (might be due to invalid IL or missing references)
//IL_0235: Unknown result type (might be due to invalid IL or missing references)
//IL_023a: Unknown result type (might be due to invalid IL or missing references)
//IL_023f: Unknown result type (might be due to invalid IL or missing references)
//IL_024c: Expected O, but got Unknown
//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
//IL_02e2: 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_02ef: Unknown result type (might be due to invalid IL or missing references)
//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0306: Expected O, but got Unknown
//IL_030d: Unknown result type (might be due to invalid IL or missing references)
//IL_0312: Unknown result type (might be due to invalid IL or missing references)
//IL_031d: Unknown result type (might be due to invalid IL or missing references)
//IL_031f: Unknown result type (might be due to invalid IL or missing references)
//IL_0324: Unknown result type (might be due to invalid IL or missing references)
//IL_0331: Expected O, but got Unknown
//IL_0338: Unknown result type (might be due to invalid IL or missing references)
//IL_033d: Unknown result type (might be due to invalid IL or missing references)
//IL_0348: Unknown result type (might be due to invalid IL or missing references)
//IL_034a: Unknown result type (might be due to invalid IL or missing references)
//IL_034f: Unknown result type (might be due to invalid IL or missing references)
//IL_0350: Unknown result type (might be due to invalid IL or missing references)
//IL_0355: Unknown result type (might be due to invalid IL or missing references)
//IL_035f: Expected O, but got Unknown
//IL_0366: Unknown result type (might be due to invalid IL or missing references)
//IL_036b: Unknown result type (might be due to invalid IL or missing references)
//IL_0376: Unknown result type (might be due to invalid IL or missing references)
//IL_0378: Unknown result type (might be due to invalid IL or missing references)
//IL_037d: Unknown result type (might be due to invalid IL or missing references)
//IL_037e: Unknown result type (might be due to invalid IL or missing references)
//IL_0383: Unknown result type (might be due to invalid IL or missing references)
//IL_038d: Expected O, but got Unknown
((BaseUnityPlugin)this).Logger.LogDebug((object)("[MoreColors] Processing: " + colorName + " by " + authorName));
string text = (string.IsNullOrEmpty(imageName) ? materialName : imageName);
ModLocalizedText val = new ModLocalizedText(colorName.Replace("-", string.Empty) + "-" + authorName.Replace("-", string.Empty) + "-" + text.Replace("-", string.Empty), "");
CachedLocals.Add(val);
if (UsedDisplayNames.Contains(colorName))
{
string text2 = colorName;
if (!string.IsNullOrEmpty(authorName))
{
colorName = authorName + " " + colorName;
}
Debug.Log((object)("[MoreColors] Conflict detected for '" + text2 + "'. Renamed to '" + colorName + "'."));
}
UsedDisplayNames.Add(colorName);
val.FallbackResult = colorName;
foreach (KeyValuePair<SystemLanguage, string> item in locals)
{
ModLocalizedText val2 = ((IEnumerable<ModLocalizedText>)CachedLocals).FirstOrDefault((Func<ModLocalizedText, bool>)((ModLocalizedText x) => x.HasLocal(item.Key, item.Value)));
if (val2 != null)
{
string[] array = val2.LocalizationKey.Split('-');
val2.UpdateLocalization(item.Key, item.Value + " (" + array[1] + ")");
val.SetLocalization(item.Key, item.Value + " (" + authorName + ")");
}
else
{
val.SetLocalization(item.Key, item.Value);
}
}
if (!string.IsNullOrEmpty(bundleName) && !string.IsNullOrEmpty(materialName))
{
string bundlePath = Path.Combine(folder, bundleName);
Material val3 = LoadMaterialFromBundle(bundlePath, materialName);
if ((Object)(object)val3 != (Object)null)
{
Costume item2 = new Costume
{
localisationKey = val.LocalizationKey,
costumeUIColor = Color.white,
properties = new List<CostumePropertyData>()
};
CachedCostumes.Add(item2);
CostumeMaterialOverrides[val.LocalizationKey] = val3;
Debug.Log((object)("[MoreColors] Registered Bundle Costume: " + colorName));
}
else
{
Debug.LogError((object)("[MoreColors] Failed to load material " + materialName + " from bundle " + bundleName));
}
}
else
{
if (string.IsNullOrEmpty(imageName))
{
return;
}
string text3 = Path.Combine(folder, imageName);
if (File.Exists(text3))
{
byte[] array2 = File.ReadAllBytes(text3);
Texture2D val4 = new Texture2D(2, 2);
if (ImageConversion.LoadImage(val4, array2))
{
((Object)val4).name = colorName;
Costume val5 = new Costume
{
localisationKey = val.LocalizationKey,
costumeUIColor = Color.white,
properties = new List<CostumePropertyData>()
};
val5.properties.Add(new CostumePropertyData
{
propertyName = "_MainTex",
type = (PropertyType)1,
textureValue = (Texture)(object)val4
});
val5.properties.Add(new CostumePropertyData
{
propertyName = "_Color",
type = (PropertyType)0,
colorValue = Color.white
});
val5.properties.Add(new CostumePropertyData
{
propertyName = "_BaseColor",
type = (PropertyType)0,
colorValue = Color.white
});
CachedCostumes.Add(val5);
Debug.Log((object)("[MoreColors] Registered Texture Costume: " + colorName));
}
}
else
{
Debug.LogWarning((object)("[MoreColors] FAILED to find image: " + text3));
}
}
}
private Material LoadMaterialFromBundle(string bundlePath, string materialName)
{
if (!LoadedBundles.ContainsKey(bundlePath))
{
if (!File.Exists(bundlePath))
{
return null;
}
AssetBundle val = AssetBundle.LoadFromFile(bundlePath);
if (!((Object)(object)val != (Object)null))
{
return null;
}
LoadedBundles.Add(bundlePath, val);
}
return LoadedBundles[bundlePath].LoadAsset<Material>(materialName);
}
[HarmonyPatch(typeof(PawnMaterial), "Awake")]
[HarmonyPostfix]
public static void PawnMaterial_Awake_Postfix(PawnMaterial __instance)
{
InjectIntoAllLibraries();
if ((Object)(object)__instance == (Object)null)
{
return;
}
PropertyRendererMapping[] array = __instance.propertyRendererMappings;
RendererMaterialSetup[] setups = __instance.rendererSetups;
if (array == null)
{
array = Array.Empty<PropertyRendererMapping>();
}
PropertyRendererMapping[] array2 = array;
List<PropertyRendererMapping> list = new List<PropertyRendererMapping>(array2.Length);
PropertyRendererMapping[] array3 = array2;
foreach (PropertyRendererMapping item in array3)
{
list.Add(item);
}
List<PropertyRendererMapping> mappingsList = list;
bool mappingsChanged = false;
EnsureMapping("_MainTex");
EnsureMapping("_Color");
EnsureMapping("_BaseColor");
if (!mappingsChanged)
{
return;
}
List<PropertyRendererMapping> list2 = mappingsList;
int i = 0;
array3 = (PropertyRendererMapping[])(object)new PropertyRendererMapping[list2.Count];
foreach (PropertyRendererMapping item3 in list2)
{
array3[i] = item3;
i++;
}
__instance.propertyRendererMappings = array3;
void EnsureMapping(string propName)
{
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Expected O, but got Unknown
//IL_006f: 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_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Expected O, but got Unknown
if (!mappingsList.Any((PropertyRendererMapping m) => m != null && m.propertyName == propName))
{
PropertyRendererMapping val = new PropertyRendererMapping
{
propertyName = propName,
targets = new List<PropertyTarget>()
};
if (setups != null)
{
RendererMaterialSetup[] array4 = setups;
foreach (RendererMaterialSetup val2 in array4)
{
if (val2 != null && (Object)(object)val2.targetRenderer != (Object)null)
{
PropertyTarget item2 = new PropertyTarget
{
targetRenderer = val2.targetRenderer,
materialIndex = 0
};
val.targets.Add(item2);
}
}
}
mappingsList.Add(val);
mappingsChanged = true;
}
}
}
[HarmonyPatch(typeof(PawnMaterial), "ApplyCostumeInternal")]
[HarmonyPrefix]
public static void PawnMaterial_ApplyCostumeInternal_Prefix(PawnMaterial __instance, int costumeIndex)
{
//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
//IL_00c2: Expected O, but got Unknown
if ((Object)(object)__instance == (Object)null || (Object)(object)__instance.costumeLibrary == (Object)null || __instance.costumeLibrary.costumes == null || costumeIndex < 0 || costumeIndex >= __instance.costumeLibrary.costumes.Length)
{
return;
}
Costume val = __instance.costumeLibrary.costumes[costumeIndex];
if (val == null)
{
return;
}
string localisationKey = val.localisationKey;
if (string.IsNullOrEmpty(localisationKey) || !CostumeMaterialOverrides.TryGetValue(localisationKey, out var value) || (Object)(object)value == (Object)null || __instance.rendererSetups == null)
{
return;
}
for (int i = 0; i < __instance.rendererSetups.Length; i++)
{
RendererMaterialSetup val2 = __instance.rendererSetups[i];
if (val2 != null && !((Object)(object)val2.targetRenderer == (Object)null) && val2.runtimeMaterials != null && val2.runtimeMaterials.Length != 0)
{
val2.runtimeMaterials[0] = new Material(value);
val2.targetRenderer.materials = val2.runtimeMaterials;
}
}
}
}
}
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
{
}
}