using System;
using System.Collections;
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 BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using PEAKLib.Core;
using PEAKLib.Items;
using PeakCringe;
using Photon.Pun;
using Photon.Realtime;
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("com.github.baphometcrafts.PeakCringe")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("0.2.0.0")]
[assembly: AssemblyInformationalVersion("0.2.0")]
[assembly: AssemblyProduct("com.github.baphometcrafts.PeakCringe")]
[assembly: AssemblyTitle("PeakCringe")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.2.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;
}
}
}
public class Action_Dodo : ItemAction
{
private DodoManager dodoManager;
public override void RunAction()
{
if (Object.op_Implicit((Object)(object)((ItemActionBase)this).character))
{
Plugin.Log.LogInfo((object)"attempting to tie a new dodo");
dodoManager = ((Component)((ItemActionBase)this).character).GetComponent<DodoManager>();
dodoManager.TieNewDodo();
}
}
}
public class TiedDodo : MonoBehaviourPunCallbacks
{
[CompilerGenerated]
private sealed class <InitRoutine>d__22 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public int characterID;
public TiedDodo <>4__this;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <InitRoutine>d__22(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
int num = <>1__state;
TiedDodo tiedDodo = <>4__this;
switch (num)
{
default:
return false;
case 0:
<>1__state = -1;
break;
case 1:
<>1__state = -1;
break;
}
if (!Object.op_Implicit((Object)(object)Character.localCharacter))
{
<>2__current = null;
<>1__state = 1;
return true;
}
PhotonView val = PhotonView.Find(characterID);
if ((Object)(object)val == (Object)null)
{
Plugin.Log.LogError((object)"Tried to assign dodo to nonexistent photon ID.");
return false;
}
DodoManager component = ((Component)val).GetComponent<DodoManager>();
Plugin.Log.LogInfo((object)$"Init Dodo for view {characterID}");
tiedDodo.dodoManager = component;
component.tiedDodos.Add(tiedDodo);
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
public LineRenderer lr;
public Transform anchor;
public Transform start;
public Transform end;
public Rigidbody rb;
public Transform dodo;
private DodoManager dodoManager;
public float floatForce = 10f;
private Vector3[] positions = (Vector3[])(object)new Vector3[2];
public float rotationSpeed = 1f;
public float heightOffest = 0.35f;
public float probablyStuckDistance = 15f;
public float unstickTime = 5f;
private float stuckTimer;
public float healingPerInterval = 0.025f;
public float healingInterval = 60f;
private float healingTimer;
public SFX_Instance healingSound;
public SFX_Instance[] barkSounds;
public void Init(DodoManager dodoManager)
{
((MonoBehaviourPun)this).photonView.RPC("RPC_Init", (RpcTarget)0, new object[1] { ((MonoBehaviourPun)dodoManager).photonView.ViewID });
}
public override void OnPlayerEnteredRoom(Player newPlayer)
{
if (((MonoBehaviourPun)this).photonView.IsMine)
{
((MonoBehaviourPun)this).photonView.RPC("RPC_Init", newPlayer, new object[1] { ((MonoBehaviourPun)dodoManager).photonView.ViewID });
}
}
[PunRPC]
public void RPC_Init(int characterID)
{
((MonoBehaviour)this).StartCoroutine(InitRoutine(characterID));
}
[IteratorStateMachine(typeof(<InitRoutine>d__22))]
private IEnumerator InitRoutine(int characterID)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <InitRoutine>d__22(0)
{
<>4__this = this,
characterID = characterID
};
}
private void LateUpdate()
{
UpdateRotation();
}
private void FixedUpdate()
{
UpdateRotation();
UnstickIfStuck();
Heal();
JumpIfPlayerJumping();
}
private void UpdateLineRenderer()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//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)
positions[0] = start.position;
positions[1] = end.position;
lr.SetPositions(positions);
}
private void UpdateRotation()
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: 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_002f: 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_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
Vector3 val = dodoManager.character.Center + Vector3.down * 0.35f - dodo.position;
float num = rotationSpeed * Time.deltaTime;
Vector3 val2 = Vector3.RotateTowards(dodo.forward, val, num, 0f);
Debug.DrawRay(dodo.position, val2, Color.red);
dodo.rotation = Quaternion.LookRotation(val2);
}
private void UnstickIfStuck()
{
//IL_0006: 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)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: 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)
float num = Vector3.Distance(dodo.position, dodoManager.character.Center);
if (num > probablyStuckDistance)
{
stuckTimer += Time.deltaTime;
}
else
{
stuckTimer = 0f;
}
if (stuckTimer > unstickTime)
{
Plugin.Log.LogInfo((object)"Unsticking Dodo");
dodo.position = dodoManager.character.Center - Vector3.forward;
}
}
private void Heal()
{
//IL_0158: Unknown result type (might be due to invalid IL or missing references)
if (!dodoManager.character.IsLocal)
{
return;
}
healingTimer += Time.deltaTime;
if (healingTimer > healingInterval)
{
healingTimer = 0f;
Plugin.Log.LogInfo((object)("Current injury: " + dodoManager.character.refs.afflictions.currentStatuses[0]));
Plugin.Log.LogInfo((object)("Current: " + dodoManager.character.refs.afflictions.currentStatuses));
if ((double)dodoManager.character.refs.afflictions.currentStatuses[0] > 0.001)
{
Plugin.Log.LogInfo((object)$"Dodo {this} healing {dodoManager.character} for {healingPerInterval} points");
dodoManager.character.refs.afflictions.SubtractStatus((STATUSTYPE)0, Mathf.Abs(healingPerInterval), false);
int num = Random.RandomRangeInt(0, barkSounds.Count());
barkSounds[num].Play(dodoManager.character.Head);
}
}
}
private void JumpIfPlayerJumping()
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
if (dodoManager.character.data.isJumping)
{
rb.AddForce(Vector3.up * floatForce, (ForceMode)5);
}
}
}
namespace MonoDetour.HookGen
{
internal static class DefaultMonoDetourManager
{
internal static MonoDetourManager Instance { get; } = New();
internal static MonoDetourManager New()
{
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Expected O, but got Unknown
return new MonoDetourManager(typeof(DefaultMonoDetourManager).Assembly.GetName().Name);
}
}
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
internal class MonoDetourTargetsAttribute : Attribute, IMonoDetourTargets
{
public Type? TargetType { get; }
public bool IncludeNestedTypes { get; set; }
public bool DistinguishOverloadsByName { get; set; }
public string[]? Members { get; set; }
public string[]? MemberNamePrefixes { get; set; }
public string[]? MemberNameSuffixes { get; set; }
public bool GenerateControlFlowVariants { get; set; }
public MonoDetourTargetsAttribute(Type? targetType = null)
{
TargetType = targetType;
IncludeNestedTypes = true;
base..ctor();
}
}
}
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 PeakCringe
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.github.baphometcrafts.PeakCringe", "PeakCringe", "0.2.0")]
public class Plugin : BaseUnityPlugin
{
internal static ManualLogSource Log;
internal static AssetBundle assets;
internal static AssetBundle itemAssets;
internal static SFX_Instance fartWithReverbSFX = (SFX_Instance)ScriptableObject.CreateInstance("SFX_Instance");
internal static SFX_Instance tomScreamSFX = (SFX_Instance)ScriptableObject.CreateInstance("SFX_Instance");
public const string Id = "com.github.baphometcrafts.PeakCringe";
internal static ModDefinition Definition { get; set; }
public static string Name => "PeakCringe";
public static string Version => "0.2.0";
private void Awake()
{
Log = ((BaseUnityPlugin)this).Logger;
Log.LogInfo((object)("Plugin " + Name + " is loaded!"));
LoadAudioClips();
LoadItems();
Harmony.CreateAndPatchAll(typeof(Patcher), (string)null);
}
private void LoadItems()
{
LoadBlueDinosaurCrunch();
LoadDodo();
}
private void LoadBlueDinosaurCrunch()
{
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "bluedinocrunch");
itemAssets = AssetBundle.LoadFromFile(text);
Item component = itemAssets.LoadAsset<GameObject>("blue dinosaur crunch.prefab").GetComponent<Item>();
Definition = ModDefinition.GetOrCreate(((BaseUnityPlugin)this).Info.Metadata);
new ItemContent(component).Register(Definition);
string[] source = new string[13]
{
"BLUE DINOSAUR CRUNCH", null, null, null, null, null, null, null, null, null,
null, null, null
};
LocalizedText.mainTable.Add("NAME_BLUE DINOSAUR CRUNCH", source.ToList());
}
private void LoadDodo()
{
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
Item component = itemAssets.LoadAsset<GameObject>("dodo.prefab").GetComponent<Item>();
Definition = ModDefinition.GetOrCreate(((BaseUnityPlugin)this).Info.Metadata);
new ItemContent(component).Register(Definition);
TiedDodo component2 = itemAssets.LoadAsset<GameObject>("tieddodo.prefab").GetComponent<TiedDodo>();
NetworkPrefabManager.RegisterNetworkPrefab(Definition, "0_Items/", ((Component)component2).gameObject);
Renderer[] componentsInChildren = ((Component)component2).GetComponentsInChildren<Renderer>();
Renderer[] array = componentsInChildren;
foreach (Renderer val in array)
{
Material[] materials = val.materials;
Material[] array2 = materials;
foreach (Material val2 in array2)
{
Shader shader = Shader.Find("W/Peak_Standard");
val2.shader = shader;
}
}
string[] array3 = new string[13]
{
"DODO", null, null, null, null, null, null, null, null, null,
null, null, null
};
LocalizedText.mainTable.Add("NAME_DODO", array3.ToList());
string[] array4 = new string[13];
array3[0] = "unleash";
LocalizedText.mainTable.Add("UNLEASH", array3.ToList());
}
private void LoadAudioClips()
{
string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
assets = AssetBundle.LoadFromFile(Path.Combine(directoryName, "peakcringeassets"));
if ((Object)(object)assets == (Object)null)
{
Log.LogError((object)"Failed to load custom assets.");
return;
}
assets.LoadAllAssets();
LoadClip(fartWithReverbSFX, "assets/sounds/fart-with-reverb.mp3", 2000);
LoadClip(tomScreamSFX, "assets/sounds/Tom_Scream_Ow.mp3", 2000);
}
private void LoadClip(SFX_Instance reference, string path, int range)
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Expected O, but got Unknown
AudioClip val = assets.LoadAsset<AudioClip>(path);
reference.settings = new SFX_Settings();
reference.settings.range = range;
reference.settings.volume = 1f;
reference.settings.pitch_Variation = 0.5f;
reference.settings.spatialBlend = 0.5f;
AudioClip[] clips = (AudioClip[])(object)new AudioClip[1] { val };
reference.clips = clips;
}
}
public static class Patcher
{
[HarmonyPostfix]
[HarmonyPatch(typeof(Character), "Awake")]
public static void AwakePatch(Character __instance)
{
((Component)__instance).gameObject.AddComponent<SlipManager>();
((Component)__instance).gameObject.AddComponent<DodoManager>();
Plugin.Log.LogInfo((object)("Added Component to character: " + __instance.characterName));
}
}
public class DodoManager : MonoBehaviourPunCallbacks
{
internal Character character;
internal List<TiedDodo> tiedDodos = new List<TiedDodo>();
internal static ManualLogSource Log { get; private set; }
private void Awake()
{
Character component = ((Component)this).GetComponent<Character>();
character = component;
}
private void FixedUpdate()
{
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
if (character.data.dead)
{
for (int i = 0; i < tiedDodos.Count; i++)
{
Object.Destroy((Object)(object)tiedDodos[i]);
}
tiedDodos.Clear();
}
else
{
for (int j = 0; j < tiedDodos.Count; j++)
{
tiedDodos[j].anchor.position = character.Center;
}
}
}
public void TieNewDodo()
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
PhotonNetwork.Instantiate("0_Items/com.github.baphometcrafts.PeakCringe:TiedDodo", character.Center, Quaternion.identity, (byte)0, (object[])null).GetComponent<TiedDodo>().Init(this);
}
}
public class SlipManager : MonoBehaviour
{
private Random random = new Random();
private Character localCharacter;
private DateTime nextSlip;
private int minSeconds = 300;
private int maxSeconds = 600;
private int slideCooldown = 10;
private DateTime lastSlideTime;
private int slideTimeBeforeScream = 1;
private DateTime timeStartedSliding;
private bool isSliding;
internal static ManualLogSource Log { get; private set; }
private void Awake()
{
Character component = ((Component)this).GetComponent<Character>();
if (component.IsLocal)
{
localCharacter = component;
nextSlip = RandomFutureTime.GetFutureTime(random, 600, 900);
Plugin.Log.LogInfo((object)$"nextSlip {nextSlip}");
Plugin.Log.LogInfo((object)$"Creating SlipManager: {RuntimeHelpers.GetHashCode(this)}");
}
}
private void Update()
{
SlideAndScream();
if ((Object)(object)localCharacter != (Object)null && DateTime.Compare(DateTime.Now, nextSlip) > 0)
{
PhotonView component = ((Component)this).GetComponent<PhotonView>();
if (!((Object)(object)component == (Object)null))
{
nextSlip = RandomFutureTime.GetFutureTime(random, minSeconds, maxSeconds);
component.RPC("RPCA_Slip", (RpcTarget)0, new object[1] { localCharacter.refs.view.ViewID });
Plugin.Log.LogInfo((object)$"nextSlip {nextSlip}");
}
}
}
private void SlideAndScream()
{
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
Character component = ((Component)this).GetComponent<Character>();
if (component.IsSliding())
{
if (!isSliding)
{
timeStartedSliding = DateTime.Now;
}
isSliding = true;
if (DateTime.Compare(lastSlideTime.AddSeconds(slideCooldown), DateTime.Now) <= 0 && DateTime.Compare(timeStartedSliding.AddSeconds(slideTimeBeforeScream), DateTime.Now) < 0)
{
Plugin.Log.LogInfo((object)(component.characterName + " is screaming!!!"));
Plugin.tomScreamSFX.Play(component.Center);
lastSlideTime = DateTime.Now;
}
}
else
{
isSliding = false;
}
}
[PunRPC]
public void RPCA_Slip(int viewID)
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Expected O, but got Unknown
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
Character component = ((Component)PhotonView.Find(viewID)).GetComponent<Character>();
if (!((Object)component == (Object)null))
{
Plugin.Log.LogInfo((object)(component.characterName + " slipped!"));
Rigidbody bodypartRig = component.GetBodypartRig((BodypartType)16);
Rigidbody bodypartRig2 = component.GetBodypartRig((BodypartType)13);
Rigidbody bodypartRig3 = component.GetBodypartRig((BodypartType)0);
Rigidbody bodypartRig4 = component.GetBodypartRig((BodypartType)4);
component.RPCA_Fall(2f);
bodypartRig.AddForce((component.data.lookDirection_Flat + Vector3.up) * 200f, (ForceMode)1);
bodypartRig2.AddForce((component.data.lookDirection_Flat + Vector3.up) * 200f, (ForceMode)1);
bodypartRig3.AddForce(Vector3.up * 1500f, (ForceMode)1);
bodypartRig4.AddForce(component.data.lookDirection_Flat * -300f, (ForceMode)1);
SFX_Player.instance.PlaySFX(Plugin.fartWithReverbSFX, component.Center, (Transform)null, (SFX_Settings)null, 3f, false);
}
}
}
public static class RandomFutureTime
{
public static DateTime GetFutureTime(Random randomInstance, int minSeconds, int maxSeconds)
{
DateTime dateTime = DateTime.Now.AddSeconds(minSeconds);
DateTime dateTime2 = DateTime.Now.AddSeconds(maxSeconds);
long ticks = (dateTime2 - dateTime).Ticks;
long value = (long)(randomInstance.NextDouble() * (double)ticks);
return dateTime.AddTicks(value);
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "com.github.baphometcrafts.PeakCringe";
public const string PLUGIN_NAME = "com.github.baphometcrafts.PeakCringe";
public const string PLUGIN_VERSION = "0.2.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
{
}
}