using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Logging;
using ContractQueen.Behaviors;
using ContractQueen.ContractEvents;
using ContractQueen.ContractManager;
using ContractQueen.Contracts;
using ContractQueen.Patches;
using ContractQueen.Persist;
using FrogDataLib.DataManagement;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Mirror;
using Unity.VisualScripting;
using UnityEngine;
using YAPYAP;
using YAPYAP.Npc.Frog;
using YapLocalizer;
[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("dev.mamallama.contractqueen")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("0.3.2.0")]
[assembly: AssemblyInformationalVersion("0.3.2+dba98a7cfc5d038db297582d2de3ec532f794d35")]
[assembly: AssemblyProduct("dev.mamallama.contractqueen")]
[assembly: AssemblyTitle("ContractQueen")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.3.2.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 ContractQueen
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("dev.mamallama.contractqueen", "ContractQueen", "0.3.2")]
public class ContractQueenPlugin : BaseUnityPlugin
{
internal const string contractName = "CONTRACT_QUEEN_TEST_CONTRACT_NAME";
internal const string contractDesc = "CONTRACT_QUEEN_TEST_CONTRACT_DESC";
internal static FrogDataContainerSimple<FrogDatabaseDTO> container;
public const string Id = "dev.mamallama.contractqueen";
internal static ManualLogSource Log { get; private set; }
internal static FrogDatabaseDTO Database => container.Data;
public static string Name => "ContractQueen";
public static string Version => "0.3.2";
private void Awake()
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Expected O, but got Unknown
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Expected O, but got Unknown
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Expected O, but got Unknown
Log = ((BaseUnityPlugin)this).Logger;
Log.LogMessage((object)"Loading localized contract data");
ModLocalizedText val = new ModLocalizedText("CONTRACT_QUEEN_TEST_CONTRACT_NAME", "");
val.SetLocalization((SystemLanguage)10, "Rescue Frogs");
val = new ModLocalizedText("CONTRACT_QUEEN_TEST_CONTRACT_DESC", "");
val.SetLocalization((SystemLanguage)10, "Rescued {0}/{1} Frogs");
Harmony val2 = new Harmony("dev.mamallama.contractqueen");
val2.PatchAll(typeof(DungeonTasksPatches));
val2.PatchAll(typeof(NetworkPuppetPropPatches));
val2.PatchAll(typeof(FrogStateMachinePatches));
container = new FrogDataContainerSimple<FrogDatabaseDTO>("dev.mamallama.contractqueen");
Log.LogInfo((object)$"Patch count: {val2.GetPatchedMethods().Count()}");
ContractsModule contractsModule = new ContractsModule("dev.mamallama.contractqueen");
contractsModule.RegisterContract("RescueFrogsQuest", (GameplayTaskSO)(object)RescueFrogsTask.Create());
}
}
}
namespace ContractQueen.Persist
{
[Serializable]
public class FrogDatabaseDTO : FrogDataModel
{
internal Dictionary<AssetMUD, FrogDataDTO> AssetLookupTable = new Dictionary<AssetMUD, FrogDataDTO>();
[SerializeField]
public List<FrogDataDTO> FrogData;
public FrogDatabaseDTO()
{
FrogData = new List<FrogDataDTO>();
}
public FrogDataDTO GetFrogData(AssetMUD mud)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
if (AssetLookupTable.TryGetValue(mud, out FrogDataDTO value))
{
ContractQueenPlugin.Log.LogDebug((object)("Mapped a DTO for frog: " + ((AssetMUD)(ref mud)).GetDigest()));
return value;
}
FrogDataDTO frogDataDTO = new FrogDataDTO
{
MUDToken = mud.Identifier
};
FrogData.Add(frogDataDTO);
ContractQueenPlugin.Log.LogDebug((object)"Created a new DTO for a frog");
return frogDataDTO;
}
public override void OnAfterSerialize()
{
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
ContractQueenPlugin.Log.LogDebug((object)$"Received serialization callback, {FrogData.Count} items in list");
AssetLookupTable.Clear();
foreach (FrogDataDTO frogDatum in FrogData)
{
AssetLookupTable[new AssetMUD(frogDatum.MUDToken)] = frogDatum;
}
}
public override void OnBeforeSerialize()
{
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
ContractQueenPlugin.Log.LogDebug((object)"Saving all FrogContractBehaviors");
FrogData.Clear();
FrogContractBehavior[] array = Object.FindObjectsByType<FrogContractBehavior>((FindObjectsInactive)0, (FindObjectsSortMode)0);
FrogContractBehavior[] array2 = array;
AssetMUD val = default(AssetMUD);
foreach (FrogContractBehavior frogContractBehavior in array2)
{
((AssetMUD)(ref val))..ctor((NetworkBehaviour)(object)((Component)frogContractBehavior).GetComponent<FrogStateMachine>());
frogContractBehavior.Data.MUDToken = val.Identifier;
ContractQueenPlugin.Log.LogDebug((object)("Saved a DTO for frog:" + ((AssetMUD)(ref val)).GetDigest()));
FrogData.Add(frogContractBehavior.Data);
}
}
}
[Serializable]
public class FrogDataDTO
{
[SerializeField]
public string MUDToken = string.Empty;
[SerializeField]
public bool HasBeenCounted;
}
}
namespace ContractQueen.Patches
{
internal class DungeonTasksPatches
{
[HarmonyPatch(typeof(DungeonTasks), "PreAwake")]
[HarmonyPostfix]
internal static void AddContractsToRandomPool()
{
ContractsRegistry.Lock();
IReadOnlyList<GameplayTaskSO> lockedList = ContractsRegistry.LockedList;
GameplayTaskSO[] frozenConstants = ContractsRegistry.FrozenConstants;
GameplayTaskSO[] frozenRandoms = ContractsRegistry.FrozenRandoms;
GameplayTaskSO[] frozenCollectibles = ContractsRegistry.FrozenCollectibles;
int num = frozenConstants.Length + frozenRandoms.Length + frozenCollectibles.Length;
int num2 = 0;
foreach (GameplayTaskSO item in lockedList)
{
item.TaskId = num + num2;
num2++;
}
DungeonTasks instance = DungeonTasks.Instance;
GameplayTaskSO[] array = frozenRandoms;
IReadOnlyList<GameplayTaskSO> readOnlyList = lockedList;
int num3 = 0;
GameplayTaskSO[] array2 = (GameplayTaskSO[])(object)new GameplayTaskSO[array.Length + readOnlyList.Count];
ReadOnlySpan<GameplayTaskSO> readOnlySpan = new ReadOnlySpan<GameplayTaskSO>(array);
readOnlySpan.CopyTo(new Span<GameplayTaskSO>(array2).Slice(num3, readOnlySpan.Length));
num3 += readOnlySpan.Length;
foreach (GameplayTaskSO item2 in readOnlyList)
{
array2[num3] = item2;
num3++;
}
instance.randomTasks = array2;
DungeonTasks instance2 = DungeonTasks.Instance;
List<GameplayTaskSO> list = new List<GameplayTaskSO>();
list.AddRange(frozenConstants);
list.AddRange(frozenRandoms);
list.AddRange(frozenCollectibles);
list.AddRange(lockedList);
instance2.allTasks = list.ToArray();
ContractQueenPlugin.Log.LogMessage((object)$"Added {num2} contract(s) to pool starting from ID {num} to {num + num2 - 1}");
}
}
internal static class FrogStateMachinePatches
{
[HarmonyPatch(typeof(FrogStateMachine), "Awake")]
[HarmonyPostfix]
internal static void AwakePatch(FrogStateMachine __instance)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
if (((Object)((Component)__instance).gameObject).GetInstanceID() <= 0)
{
FrogContractBehavior frogContractBehavior = ComponentHolderProtocol.AddComponent<FrogContractBehavior>((Object)(object)__instance);
AssetMUD mud = default(AssetMUD);
((AssetMUD)(ref mud))..ctor((NetworkBehaviour)(object)__instance);
FrogDataDTO frogData = ContractQueenPlugin.Database.GetFrogData(mud);
frogContractBehavior.Data = frogData;
}
}
}
internal static class NetworkPuppetPropPatches
{
[HarmonyPatch(typeof(NetworkPuppetProp), "OnDropped")]
[HarmonyPostfix]
internal static void ServerSetInInventoryPatch(NetworkPuppetProp __instance)
{
FrogContractBehavior component = ((Component)__instance).GetComponent<FrogContractBehavior>();
ContractQueenPlugin.Log.LogDebug((object)$"OnDropped: {((Object)((Component)__instance).gameObject).name} | {__instance.DisplayName}({((Object)__instance).GetInstanceID()}), isFrog: {(Object)(object)component != (Object)null}");
if (!((Object)(object)component == (Object)null) && !component.HasBeenCounted)
{
ContractQueenPlugin.Log.LogDebug((object)$"New frog: {!component.HasBeenCounted}");
Events.CountFrog(component);
}
}
}
}
namespace ContractQueen.Contracts
{
public class RescueFrogsTask : GameplayTaskSO
{
[SerializeField]
private int frogCount = 3;
public static RescueFrogsTask Create()
{
RescueFrogsTask rescueFrogsTask = ScriptableObject.CreateInstance<RescueFrogsTask>();
((GameplayTaskSO)rescueFrogsTask).nameLocalisationKey = "CONTRACT_QUEEN_TEST_CONTRACT_NAME";
((GameplayTaskSO)rescueFrogsTask).descriptionLocalisationKey = "CONTRACT_QUEEN_TEST_CONTRACT_DESC";
((GameplayTaskSO)rescueFrogsTask).pointValue = 300;
return rescueFrogsTask;
}
public override bool CanBeCreated()
{
return true;
}
protected override int CalculateTargetProgress()
{
return frogCount;
}
public override void SubscribeToProgressEvents(GameplayTask runtimeTask)
{
GameplayTask runtimeTask2 = runtimeTask;
Action<FrogContractBehavior> action = delegate
{
ContractQueenPlugin.Log.LogDebug((object)"Counted a frog for a quest");
runtimeTask2.AdvanceProgress(1);
};
runtimeTask2.SetProgressHandler((Delegate)action);
Events.FrogCountedEvent += action;
}
public override void UnsubscribeFromProgressEvents(GameplayTask runtimeTask)
{
if (runtimeTask.GetProgressHandler() is Action<FrogContractBehavior> value)
{
Events.FrogCountedEvent -= value;
runtimeTask.SetProgressHandler((Delegate)null);
}
}
}
}
namespace ContractQueen.ContractManager
{
public class ContractBundle
{
public readonly string Name;
public readonly GameplayTaskSO Contract;
public ContractBundle(string name, GameplayTaskSO contract)
{
Name = name;
Contract = contract;
base..ctor();
}
}
internal class ContractBundleComparer : IComparer<ContractBundle>
{
public static readonly IComparer<ContractBundle> NameOrdinal = new ContractBundleComparer();
public int Compare(ContractBundle x, ContractBundle y)
{
if (x == y)
{
return 0;
}
if (x == null)
{
return -1;
}
if (y == null)
{
return 1;
}
return StringComparer.Ordinal.Compare(x.Name, y.Name);
}
}
public sealed class ContractsModule
{
private readonly string GUID;
private readonly SortedSet<ContractBundle> _contracts;
public ContractsModule(string guid)
{
GUID = guid;
_contracts = ContractsRegistry.EnsureGUID(GUID);
}
public bool RegisterContract(ContractBundle contract)
{
return _contracts.Add(contract);
}
public bool RegisterContract(string name, GameplayTaskSO contract)
{
return _contracts.Add(new ContractBundle(name, contract));
}
public void RegisterMany(IEnumerable<ContractBundle> items)
{
LinqUtility.AddRange<ContractBundle>((ICollection<ContractBundle>)_contracts, items);
}
}
internal static class ContractsRegistry
{
private static readonly SortedDictionary<string, SortedSet<ContractBundle>> Registry = new SortedDictionary<string, SortedSet<ContractBundle>>(StringComparer.Ordinal);
private static bool Finalized = false;
private static IReadOnlyList<GameplayTaskSO> _cachedLockedList = Array.Empty<GameplayTaskSO>();
internal static GameplayTaskSO[] FrozenConstants { get; private set; } = Array.Empty<GameplayTaskSO>();
internal static GameplayTaskSO[] FrozenCollectibles { get; private set; } = Array.Empty<GameplayTaskSO>();
internal static GameplayTaskSO[] FrozenRandoms { get; private set; } = Array.Empty<GameplayTaskSO>();
public static IReadOnlyList<GameplayTaskSO> LockedList => _cachedLockedList;
internal static SortedSet<ContractBundle> EnsureGUID(string GUID)
{
if (Finalized)
{
throw new InvalidOperationException("Cannot add quests after main menu is reached");
}
if (Registry.TryGetValue(GUID, out SortedSet<ContractBundle> value))
{
return value;
}
SortedSet<ContractBundle> sortedSet = new SortedSet<ContractBundle>(ContractBundleComparer.NameOrdinal);
Registry[GUID] = sortedSet;
return sortedSet;
}
internal static void Lock()
{
try
{
List<GameplayTaskSO> list = new List<GameplayTaskSO>();
foreach (SortedSet<ContractBundle> value in Registry.Values)
{
foreach (ContractBundle item in value)
{
list.Add(item.Contract);
}
}
FrozenConstants = DungeonTasks.Instance.constantTasks;
FrozenRandoms = DungeonTasks.Instance.randomTasks;
FrozenCollectibles = DungeonTasks.Instance.collectableTasks;
ContractQueenPlugin.Log.LogMessage((object)ListContracts());
_cachedLockedList = list.AsReadOnly();
Finalized = true;
}
catch (Exception ex)
{
ContractQueenPlugin.Log.LogError((object)(ex.Message + "\n\n" + ex.StackTrace));
}
}
public static string ListContracts()
{
StringBuilder stringBuilder = new StringBuilder("Contracts Loaded:\n");
foreach (KeyValuePair<string, SortedSet<ContractBundle>> item in Registry)
{
stringBuilder.AppendLine(" [" + item.Key + "]");
foreach (ContractBundle item2 in item.Value)
{
stringBuilder.AppendLine(" -" + item2.Name);
}
}
return stringBuilder.ToString();
}
}
}
namespace ContractQueen.ContractEvents
{
public static class Events
{
public static event Action<FrogContractBehavior>? FrogCountedEvent;
internal static void CountFrog(FrogContractBehavior frog)
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
if ((int)GameManager.Instance.CurrentGameState == 0)
{
Events.FrogCountedEvent?.Invoke(frog);
}
frog.Count();
}
}
}
namespace ContractQueen.Behaviors
{
public class FrogContractBehavior : MonoBehaviour
{
public FrogDataDTO Data;
public NetworkPuppetProp Owner { get; protected set; }
public bool HasBeenCounted => Data.HasBeenCounted;
private void Awake()
{
Owner = ((Component)this).gameObject.GetComponent<NetworkPuppetProp>();
if ((Object)(object)Owner == (Object)null)
{
ContractQueenPlugin.Log.LogError((object)"Unable to establish owner in FrogContractBehavior");
}
}
public void Count()
{
Data.HasBeenCounted = true;
}
}
}
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
{
}
}