Files
Aug2021-Cpp2IL-Dump/mscorlib/System/Reflection/CustomAttributeExtensions.cs
T
2026-04-10 22:50:51 +02:00

164 lines
11 KiB
C#

using System;
using Cpp2IlInjected;
namespace System.Reflection
{
/// <summary>Contains static methods for retrieving custom attributes.</summary>
// Token: 0x02000202 RID: 514
[Token(Token = "0x2000202")]
public static class CustomAttributeExtensions
{
/// <summary>Retrieves a custom attribute of a specified type that is applied to a specified assembly.</summary>
/// <param name="element">The assembly to inspect.</param>
/// <param name="attributeType">The type of attribute to search for.</param>
/// <returns>A custom attribute that matches <paramref name="attributeType" />, or <see langword="null" /> if no such attribute is found.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="element" /> or <paramref name="attributeType" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="attributeType" /> is not derived from <see cref="T:System.Attribute" />.</exception>
/// <exception cref="T:System.Reflection.AmbiguousMatchException">More than one of the requested attributes was found.</exception>
// Token: 0x060013AB RID: 5035 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60013AB")]
[Address(RVA = "0x2A047C0", Offset = "0x2A035C0", VA = "0x182A047C0")]
public static Attribute GetCustomAttribute(this Assembly element, Type attributeType)
{
return null;
}
/// <summary>Retrieves a custom attribute of a specified type that is applied to a specified member.</summary>
/// <param name="element">The member to inspect.</param>
/// <param name="attributeType">The type of attribute to search for.</param>
/// <returns>A custom attribute that matches <paramref name="attributeType" />, or <see langword="null" /> if no such attribute is found.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="element" /> or <paramref name="attributeType" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="attributeType" /> is not derived from <see cref="T:System.Attribute" />.</exception>
/// <exception cref="T:System.NotSupportedException">
/// <paramref name="element" /> is not a constructor, method, property, event, type, or field.</exception>
/// <exception cref="T:System.Reflection.AmbiguousMatchException">More than one of the requested attributes was found.</exception>
/// <exception cref="T:System.TypeLoadException">A custom attribute type cannot be loaded.</exception>
// Token: 0x060013AC RID: 5036 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60013AC")]
[Address(RVA = "0x2A047A0", Offset = "0x2A035A0", VA = "0x182A047A0")]
public static Attribute GetCustomAttribute(this MemberInfo element, Type attributeType)
{
return null;
}
/// <summary>Retrieves a custom attribute of a specified type that is applied to a specified assembly.</summary>
/// <param name="element">The assembly to inspect.</param>
/// <typeparam name="T">The type of attribute to search for.</typeparam>
/// <returns>A custom attribute that matches <paramref name="T" />, or <see langword="null" /> if no such attribute is found.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="element" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.Reflection.AmbiguousMatchException">More than one of the requested attributes was found.</exception>
// Token: 0x060013AD RID: 5037 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60013AD")]
[Address(RVA = "0x1295810", Offset = "0x1294610", VA = "0x181295810")]
public static T GetCustomAttribute<T>(this Assembly element) where T : Attribute
{
return null;
}
/// <summary>Retrieves a custom attribute of a specified type that is applied to a specified member.</summary>
/// <param name="element">The member to inspect.</param>
/// <typeparam name="T">The type of attribute to search for.</typeparam>
/// <returns>A custom attribute that matches <paramref name="T" />, or <see langword="null" /> if no such attribute is found.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="element" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.NotSupportedException">
/// <paramref name="element" /> is not a constructor, method, property, event, type, or field.</exception>
/// <exception cref="T:System.Reflection.AmbiguousMatchException">More than one of the requested attributes was found.</exception>
/// <exception cref="T:System.TypeLoadException">A custom attribute type cannot be loaded.</exception>
// Token: 0x060013AE RID: 5038 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60013AE")]
[Address(RVA = "0x1295750", Offset = "0x1294550", VA = "0x181295750")]
public static T GetCustomAttribute<T>(this MemberInfo element) where T : Attribute
{
return null;
}
/// <summary>Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member.</summary>
/// <param name="element">The member to inspect.</param>
/// <param name="attributeType">The type of attribute to search for.</param>
/// <param name="inherit">
/// <see langword="true" /> to inspect the ancestors of <paramref name="element" />; otherwise, <see langword="false" />.</param>
/// <returns>A custom attribute that matches <paramref name="attributeType" />, or <see langword="null" /> if no such attribute is found.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="element" /> or <paramref name="attributeType" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="attributeType" /> is not derived from <see cref="T:System.Attribute" />.</exception>
/// <exception cref="T:System.NotSupportedException">
/// <paramref name="element" /> is not a constructor, method, property, event, type, or field.</exception>
/// <exception cref="T:System.Reflection.AmbiguousMatchException">More than one of the requested attributes was found.</exception>
/// <exception cref="T:System.TypeLoadException">A custom attribute type cannot be loaded.</exception>
// Token: 0x060013AF RID: 5039 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60013AF")]
[Address(RVA = "0x2A047D0", Offset = "0x2A035D0", VA = "0x182A047D0")]
public static Attribute GetCustomAttribute(this MemberInfo element, Type attributeType, bool inherit)
{
return null;
}
/// <summary>Retrieves a custom attribute of a specified type that is applied to a specified parameter, and optionally inspects the ancestors of that parameter.</summary>
/// <param name="element">The parameter to inspect.</param>
/// <param name="attributeType">The type of attribute to search for.</param>
/// <param name="inherit">
/// <see langword="true" /> to inspect the ancestors of <paramref name="element" />; otherwise, <see langword="false" />.</param>
/// <returns>A custom attribute matching <paramref name="attributeType" />, or <see langword="null" /> if no such attribute is found.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="element" /> or <paramref name="attributeType" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="attributeType" /> is not derived from <see cref="T:System.Attribute" />.</exception>
/// <exception cref="T:System.Reflection.AmbiguousMatchException">More than one of the requested attributes was found.</exception>
/// <exception cref="T:System.TypeLoadException">A custom attribute type cannot be loaded.</exception>
// Token: 0x060013B0 RID: 5040 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60013B0")]
[Address(RVA = "0x2A047B0", Offset = "0x2A035B0", VA = "0x182A047B0")]
public static Attribute GetCustomAttribute(this ParameterInfo element, Type attributeType, bool inherit)
{
return null;
}
/// <summary>Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member.</summary>
/// <param name="element">The member to inspect.</param>
/// <param name="inherit">
/// <see langword="true" /> to inspect the ancestors of <paramref name="element" />; otherwise, <see langword="false" />.</param>
/// <typeparam name="T">The type of attribute to search for.</typeparam>
/// <returns>A custom attribute that matches <paramref name="T" />, or <see langword="null" /> if no such attribute is found.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="element" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.NotSupportedException">
/// <paramref name="element" /> is not a constructor, method, property, event, type, or field.</exception>
/// <exception cref="T:System.Reflection.AmbiguousMatchException">More than one of the requested attributes was found.</exception>
/// <exception cref="T:System.TypeLoadException">A custom attribute type cannot be loaded.</exception>
// Token: 0x060013B1 RID: 5041 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60013B1")]
[Address(RVA = "0x1295680", Offset = "0x1294480", VA = "0x181295680")]
public static T GetCustomAttribute<T>(this MemberInfo element, bool inherit) where T : Attribute
{
return null;
}
/// <summary>Retrieves a custom attribute of a specified type that is applied to a specified parameter, and optionally inspects the ancestors of that parameter.</summary>
/// <param name="element">The parameter to inspect.</param>
/// <param name="inherit">
/// <see langword="true" /> to inspect the ancestors of <paramref name="element" />; otherwise, <see langword="false" />.</param>
/// <typeparam name="T">The type of attribute to search for.</typeparam>
/// <returns>A custom attribute that matches <paramref name="T" />, or <see langword="null" /> if no such attribute is found.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="element" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.NotSupportedException">
/// <paramref name="element" /> is not a constructor, method, property, event, type, or field.</exception>
/// <exception cref="T:System.Reflection.AmbiguousMatchException">More than one of the requested attributes was found.</exception>
/// <exception cref="T:System.TypeLoadException">A custom attribute type cannot be loaded.</exception>
// Token: 0x060013B2 RID: 5042 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60013B2")]
[Address(RVA = "0x12955B0", Offset = "0x12943B0", VA = "0x1812955B0")]
public static T GetCustomAttribute<T>(this ParameterInfo element, bool inherit) where T : Attribute
{
return null;
}
}
}