using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
[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("AutoSpin")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyInformationalVersion("0.1.0")]
[assembly: AssemblyProduct("AutoSpin")]
[assembly: AssemblyTitle("AutoSpin")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.0.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;
}
}
}
[BepInPlugin("pharmacomaniac.autospin", "Auto Spin", "1.0.0")]
public class CloverPitAutoSpinPlugin : BaseUnityPlugin
{
public const string PluginGuid = "pharmacomaniac.autospin";
public const string PluginName = "Auto Spin";
public const string PluginVersion = "1.0.0";
internal static CloverPitAutoSpinPlugin Instance;
internal static ManualLogSource Log;
private ConfigEntry<KeyCode> _toggleKey;
private ConfigEntry<bool> _persistentMode;
private ConfigEntry<bool> _pauseWhenRedButtonLit;
private ConfigEntry<float> _autoSpinDelaySeconds;
private ConfigEntry<bool> _rightClickLeverToggle;
private ConfigEntry<bool> _autoPressRedButton;
private bool _autoSpinDesired;
private bool _pausedForRedButtonLight;
private State _lastSlotState;
private bool _lastRedButtonLit;
private int _currentRedButtonSignalId;
private int _lastSignalIdWePausedFor;
private Harmony _harmony;
private void Awake()
{
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Expected O, but got Unknown
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0105: Expected O, but got Unknown
Instance = this;
Log = ((BaseUnityPlugin)this).Logger;
_toggleKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("General", "ToggleKey", (KeyCode)116, "Key used to toggle auto-spin on or off.");
_rightClickLeverToggle = ((BaseUnityPlugin)this).Config.Bind<bool>("Input", "EnableRightClickLeverToggle", true, "If true, right-clicking the slot machine lever toggles auto-spin.");
_persistentMode = ((BaseUnityPlugin)this).Config.Bind<bool>("Behavior", "PersistentAcrossRounds", false, "If true, your auto-spin toggle persists across rounds and is re-applied automatically each round.");
_pauseWhenRedButtonLit = ((BaseUnityPlugin)this).Config.Bind<bool>("Behavior", "PauseOnRedButtonFlash", true, "If true, auto-spin pauses once whenever the red button lights up.");
_autoSpinDelaySeconds = ((BaseUnityPlugin)this).Config.Bind<float>("Behavior", "AutoSpinDelaySeconds", 0.5f, new ConfigDescription("Delay between automatic spins in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.05f, 1f), Array.Empty<object>()));
_autoPressRedButton = ((BaseUnityPlugin)this).Config.Bind<bool>("Behavior", "AutoPressRedButton", false, "Automatically press the red button whenever it lights up and the machine is idle.");
_harmony = new Harmony("pharmacomaniac.autospin");
_harmony.PatchAll(typeof(CloverPitAutoSpinPlugin).Assembly);
Log.LogInfo((object)"Auto Spin 1.0.0 loaded.");
}
private void OnDestroy()
{
try
{
Harmony harmony = _harmony;
if (harmony != null)
{
harmony.UnpatchSelf();
}
}
catch (Exception arg)
{
Log.LogError((object)$"Error while unpatching: {arg}");
}
}
private void Update()
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: 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)
if (Application.isFocused)
{
SlotMachineScript instance = SlotMachineScript.instance;
State val = SlotMachineScript.StateGet();
HandleHotkey();
HandleRoundBoundaries(val);
if ((Object)(object)instance == (Object)null)
{
_lastSlotState = val;
return;
}
HandleRedButtonIndicatorPause(instance, val);
ApplyDesiredAutoSpinState(instance, val);
_lastSlotState = val;
}
}
private void HandleHotkey()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
if (Input.GetKeyDown(_toggleKey.Value))
{
HandleToggleRequestFromPlayerInput();
}
}
internal void HandleToggleRequestFromPlayerInput()
{
if (_autoSpinDesired && _pausedForRedButtonLight)
{
_pausedForRedButtonLight = false;
_lastSignalIdWePausedFor = _currentRedButtonSignalId;
Log.LogDebug((object)"Auto-spin manually resumed while the red button light is still active; ignoring the current flash cycle.");
return;
}
bool autoSpinDesired = _autoSpinDesired;
_autoSpinDesired = !_autoSpinDesired;
if (!_autoSpinDesired)
{
_pausedForRedButtonLight = false;
}
Log.LogDebug((object)$"AutoSpinDesired: {autoSpinDesired} -> {_autoSpinDesired}");
}
internal static bool IsRightClickLeverToggleEnabled()
{
if ((Object)(object)Instance != (Object)null)
{
return Instance._rightClickLeverToggle.Value;
}
return false;
}
internal static bool IsAutoPressRedButtonEnabled()
{
if ((Object)(object)Instance != (Object)null)
{
return Instance._autoPressRedButton.Value;
}
return false;
}
private void HandleRoundBoundaries(State currentState)
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
if (!_persistentMode.Value && (int)_lastSlotState != 0 && (int)currentState == 0)
{
_autoSpinDesired = false;
_pausedForRedButtonLight = false;
_lastSignalIdWePausedFor = _currentRedButtonSignalId;
Log.LogDebug((object)"Round ended: resetting desired auto-spin (non-persistent mode).");
}
}
private void HandleRedButtonIndicatorPause(SlotMachineScript slot, State currentState)
{
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
if (!_pauseWhenRedButtonLit.Value)
{
return;
}
if (!_autoSpinDesired)
{
_lastRedButtonLit = RedButtonScript.IsAnyTriggerAvailable();
return;
}
bool flag = RedButtonScript.IsAnyTriggerAvailable();
if (flag && !_lastRedButtonLit)
{
_currentRedButtonSignalId++;
Log.LogDebug((object)$"Red button indicator lit up. SignalId = {_currentRedButtonSignalId}");
}
bool flag2 = IsMachineReadyForAutoSpin(currentState);
bool flag3 = slot.IsAutoSpinning();
if (flag2 && _autoSpinDesired && flag && flag3 && _currentRedButtonSignalId != 0 && _currentRedButtonSignalId != _lastSignalIdWePausedFor)
{
Log.LogDebug((object)"Pausing auto-spin because the red button light signaled an available trigger.");
slot.AutoSpinToggle();
_pausedForRedButtonLight = true;
_lastSignalIdWePausedFor = _currentRedButtonSignalId;
}
if (_pausedForRedButtonLight && _autoSpinDesired && !flag && flag2 && !slot.IsAutoSpinning())
{
Log.LogDebug((object)"Resuming auto-spin after the red button light turned off.");
slot.AutoSpinToggle();
_pausedForRedButtonLight = false;
}
_lastRedButtonLit = flag;
}
private void ApplyDesiredAutoSpinState(SlotMachineScript slot, State currentState)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
bool flag = IsMachineReadyForAutoSpin(currentState);
bool flag2 = _autoSpinDesired && !_pausedForRedButtonLight && flag;
bool flag3 = slot.IsAutoSpinning();
if (flag2 != flag3 && flag)
{
Log.LogDebug((object)$"Aligning auto-spin: actual={flag3}, desired={flag2}");
slot.AutoSpinToggle();
}
}
private static bool IsMachineReadyForAutoSpin(State state)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0002: Invalid comparison between Unknown and I4
//IL_0004: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Invalid comparison between Unknown and I4
if ((int)state != 3)
{
return (int)state == 4;
}
return true;
}
public static float GetConfiguredAutoSpinDelay()
{
if ((Object)(object)Instance == (Object)null)
{
return 0.5f;
}
return Mathf.Clamp(Instance._autoSpinDelaySeconds.Value, 0.05f, 5f);
}
}
internal static class AutoRedButtonLogic
{
private static bool _shouldApplyPatch = true;
private static bool _eligibilityChecked;
internal static bool ShouldApplyPatch()
{
if (_eligibilityChecked)
{
return _shouldApplyPatch;
}
_shouldApplyPatch = EvaluatePatchEligibility();
_eligibilityChecked = true;
return _shouldApplyPatch;
}
private static bool EvaluatePatchEligibility()
{
try
{
MethodInfo methodInfo = AccessTools.Method(typeof(RedButtonScript), "Update", (Type[])null, (Type[])null);
if (methodInfo == null)
{
ManualLogSource log = CloverPitAutoSpinPlugin.Log;
if (log != null)
{
log.LogWarning((object)"[AutoRedButton] Unable to find RedButtonScript.Update; skipping auto-press patch.");
}
return false;
}
Patches patchInfo = Harmony.GetPatchInfo((MethodBase)methodInfo);
if (patchInfo == null)
{
return true;
}
List<string> conflicts = new List<string>();
CollectConflicts(patchInfo.Prefixes, "Prefix");
CollectConflicts(patchInfo.Postfixes, "Postfix");
CollectConflicts(patchInfo.Transpilers, "Transpiler");
CollectConflicts(patchInfo.Finalizers, "Finalizer");
if (conflicts.Count == 0)
{
return true;
}
ManualLogSource log2 = CloverPitAutoSpinPlugin.Log;
if (log2 != null)
{
log2.LogWarning((object)"[AutoRedButton] Detected another mod patching RedButtonScript.Update; disabling auto-press patch.");
}
foreach (string item in conflicts)
{
ManualLogSource log3 = CloverPitAutoSpinPlugin.Log;
if (log3 != null)
{
log3.LogDebug((object)("[AutoRedButton] " + item));
}
}
return false;
void CollectConflicts(IEnumerable<Patch> patches, string kind)
{
if (patches == null)
{
return;
}
foreach (Patch patch in patches)
{
if (patch != null && !string.Equals(patch.owner, "pharmacomaniac.autospin"))
{
conflicts.Add(kind + " from " + patch.owner);
}
}
}
}
catch (Exception arg)
{
ManualLogSource log4 = CloverPitAutoSpinPlugin.Log;
if (log4 != null)
{
log4.LogError((object)$"[AutoRedButton] Failed while inspecting existing RedButtonScript.Update patches: {arg}");
}
return true;
}
}
internal static void TryAutoPress(RedButtonScript? button)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Invalid comparison between Unknown and I4
if (!CloverPitAutoSpinPlugin.IsAutoPressRedButtonEnabled() || (Object)(object)button == (Object)null)
{
return;
}
try
{
SlotMachineScript instance = SlotMachineScript.instance;
if (!((Object)(object)instance == (Object)null))
{
State val = SlotMachineScript.StateGet();
if ((int)val == 3 && RedButtonScript.IsAnyTriggerAvailable())
{
button.Press();
}
}
}
catch (Exception arg)
{
ManualLogSource log = CloverPitAutoSpinPlugin.Log;
if (log != null)
{
log.LogError((object)$"[AutoRedButton] Failed while attempting to auto-press the red button: {arg}");
}
}
}
}
[HarmonyPatch(typeof(RedButtonScript), "Update")]
internal static class RedButtonScript_Update_AutoPressPatch
{
private static bool Prepare()
{
return AutoRedButtonLogic.ShouldApplyPatch();
}
[HarmonyPostfix]
private static void Postfix(RedButtonScript __instance)
{
AutoRedButtonLogic.TryAutoPress(__instance);
}
}
[HarmonyPatch]
internal static class RightClickLeverPatches
{
private static DiegeticMenuElement? _cachedLever;
private static bool IsSlotLeverButton(DiegeticMenuElement elem)
{
if ((Object)(object)elem == (Object)null)
{
return false;
}
SlotMachineScript instance = SlotMachineScript.instance;
if ((Object)(object)instance != (Object)null)
{
DiegeticMenuElement leverMenuElement = instance.leverMenuElement;
if ((Object)(object)leverMenuElement != (Object)null && _cachedLever != leverMenuElement)
{
_cachedLever = leverMenuElement;
}
}
if ((Object)(object)_cachedLever == (Object)null)
{
return false;
}
if (elem == _cachedLever)
{
return true;
}
return false;
}
[HarmonyPostfix]
[HarmonyPatch(typeof(DiegeticMenuElement), "Update")]
private static void DiegeticMenuElement_Update_Postfix(DiegeticMenuElement __instance)
{
if (!CloverPitAutoSpinPlugin.IsRightClickLeverToggleEnabled())
{
return;
}
try
{
if (Application.isFocused && IsSlotLeverButton(__instance) && __instance.IsMouseOnMe() && Input.GetMouseButtonDown(1))
{
CloverPitAutoSpinPlugin.Instance?.HandleToggleRequestFromPlayerInput();
}
}
catch (Exception arg)
{
ManualLogSource log = CloverPitAutoSpinPlugin.Log;
if (log != null)
{
log.LogError((object)$"[RightClickLever] Error while handling DiegeticMenuElement.Update postfix: {arg}");
}
}
}
}
[HarmonyPatch(typeof(SlotMachineScript), "Update")]
public static class SlotMachine_Update_AutoSpinDelayTranspiler
{
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Expected O, but got Unknown
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Expected O, but got Unknown
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Expected O, but got Unknown
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: Expected O, but got Unknown
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Expected O, but got Unknown
FieldInfo fieldInfo = AccessTools.Field(typeof(SlotMachineScript), "autoSpinDelay");
MethodInfo methodInfo = AccessTools.Method(typeof(CloverPitAutoSpinPlugin), "GetConfiguredAutoSpinDelay", (Type[])null, (Type[])null);
if (fieldInfo == null || methodInfo == null)
{
ManualLogSource log = CloverPitAutoSpinPlugin.Log;
if (log != null)
{
log.LogError((object)"AutoSpinDelay transpiler: failed to find autoSpinDelay field or GetConfiguredAutoSpinDelay method.");
}
return instructions;
}
CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
int num = 0;
while (val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[3]
{
new CodeMatch((OpCode?)OpCodes.Ldarg_0, (object)null, (string)null),
new CodeMatch((OpCode?)OpCodes.Ldc_R4, (object)0.5f, (string)null),
new CodeMatch((OpCode?)OpCodes.Stfld, (object)fieldInfo, (string)null)
}).IsValid)
{
val.Advance(1).SetInstruction(new CodeInstruction(OpCodes.Call, (object)methodInfo));
num++;
}
if (num == 0)
{
ManualLogSource log2 = CloverPitAutoSpinPlugin.Log;
if (log2 != null)
{
log2.LogError((object)"AutoSpinDelay transpiler did not find any ldarg.0/ldc.r4 0.5/stfld autoSpinDelay pattern. The game may have changed.");
}
}
else
{
ManualLogSource log3 = CloverPitAutoSpinPlugin.Log;
if (log3 != null)
{
log3.LogDebug((object)$"AutoSpinDelay transpiler patched {num} occurrence(s) of the default autoSpinDelay reset.");
}
}
return val.InstructionEnumeration();
}
}
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
{
}
}