System.Attribute.cs

ylbtech-System.Attribute.cs
1.返回顶部
1、
#region 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\mscorlib.dll
#endregion

using System.Reflection;
using System.Runtime.InteropServices;
using System.Security;

namespace System
{
    //
    // 摘要:
    //     表示自定义特性的基类。
    [AttributeUsageAttribute(AttributeTargets.All, Inherited = true, AllowMultiple = false)]
    [ClassInterfaceAttribute(ClassInterfaceType.None)]
    [ComDefaultInterfaceAttribute(typeof(_Attribute))]
    [ComVisibleAttribute(true)]
    public abstract class Attribute : _Attribute
    {
        //
        // 摘要:
        //     初始化 System.Attribute 类的新实例。
        protected Attribute();

        //
        // 摘要:
        //     在派生类中实现时,获取此 System.Attribute 的唯一标识符。
        //
        // 返回结果:
        //     System.Object特性的唯一标识符。
        public virtual object TypeId { get; }

        //
        // 摘要:
        //     检索应用于程序集的自定义属性。 参数指定的程序集、 自定义特性来进行搜索,并忽略的搜索选项的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Assembly 类的对象,用于描述模块的可重用集合。
        //
        //   attributeType:
        //     类型或要搜索的自定义特性的基类型。
        //
        //   inherit:
        //     此参数将被忽略,并不会影响此方法的操作。
        //
        // 返回结果:
        //     对类型的单个自定义属性的引用 attributeType 应用于 element, ,或 null 如果没有这样的属性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType 不源自 System.Attribute。
        //
        //   T:System.Reflection.AmbiguousMatchException:
        //     找到多个请求的属性。
        public static Attribute GetCustomAttribute(Assembly element, Type attributeType, bool inherit);
        //
        // 摘要:
        //     检索应用于指定的程序集的自定义特性。 参数指定要搜索的程序集和自定义特性的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Assembly 类的对象,用于描述模块的可重用集合。
        //
        //   attributeType:
        //     类型或要搜索的自定义属性的基类型。
        //
        // 返回结果:
        //     对类型的单个自定义属性的引用attributeType,可应用于element,或null如果没有此类的属性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType不派生自System.Attribute。
        //
        //   T:System.Reflection.AmbiguousMatchException:
        //     找到多个请求的属性之一。
        public static Attribute GetCustomAttribute(Assembly element, Type attributeType);
        //
        // 摘要:
        //     检索应用于类型的成员的自定义特性。 参数指定该成员和要搜索的自定义属性的类型。
        //
        // 参数:
        //   element:
        //     一个对象派生自System.Reflection.MemberInfo类,用于描述类的构造函数、 事件、 字段、 方法或属性的成员。
        //
        //   attributeType:
        //     类型或要搜索的自定义属性的基类型。
        //
        // 返回结果:
        //     对类型的单个自定义属性的引用attributeType,可应用于element,或null如果没有此类的属性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType不派生自System.Attribute。
        //
        //   T:System.NotSupportedException:
        //     element不是构造函数、 方法、 属性、 事件、 类型或字段。
        //
        //   T:System.Reflection.AmbiguousMatchException:
        //     找到多个请求的属性之一。
        //
        //   T:System.TypeLoadException:
        //     无法加载自定义属性类型。
        public static Attribute GetCustomAttribute(MemberInfo element, Type attributeType);
        //
        // 摘要:
        //     检索应用于类型的成员的自定义特性。 参数指定该成员、 自定义属性来进行搜索,以及是否要搜索的成员的祖先的类型。
        //
        // 参数:
        //   element:
        //     一个对象派生自System.Reflection.MemberInfo类,用于描述类的构造函数、 事件、 字段、 方法或属性的成员。
        //
        //   attributeType:
        //     类型或要搜索的自定义属性的基类型。
        //
        //   inherit:
        //     如果true,指定对还搜索上级element自定义特性。
        //
        // 返回结果:
        //     对类型的单个自定义属性的引用attributeType,可应用于element,或null如果没有此类的属性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType不派生自System.Attribute。
        //
        //   T:System.NotSupportedException:
        //     element不是构造函数、 方法、 属性、 事件、 类型或字段。
        //
        //   T:System.Reflection.AmbiguousMatchException:
        //     找到多个请求的属性之一。
        //
        //   T:System.TypeLoadException:
        //     无法加载自定义属性类型。
        public static Attribute GetCustomAttribute(MemberInfo element, Type attributeType, bool inherit);
        //
        // 摘要:
        //     检索应用于某个模块的自定义特性。 参数指定模块、 类型的自定义属性来进行搜索,并忽略的搜索选项。
        //
        // 参数:
        //   element:
        //     一个对象派生自System.Reflection.Module类,用于描述可移植可执行文件。
        //
        //   attributeType:
        //     类型或要搜索的自定义属性的基类型。
        //
        //   inherit:
        //     此参数将被忽略,并且不会影响此方法的操作。
        //
        // 返回结果:
        //     对类型的单个自定义属性的引用attributeType,可应用于element,或null如果没有此类的属性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType不派生自System.Attribute。
        //
        //   T:System.Reflection.AmbiguousMatchException:
        //     找到多个请求的属性之一。
        public static Attribute GetCustomAttribute(Module element, Type attributeType, bool inherit);
        //
        // 摘要:
        //     检索应用于模块的自定义属性。 参数指定该模块,以及要搜索的自定义特性的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Module 类,用于描述可移植可执行文件。
        //
        //   attributeType:
        //     类型或要搜索的自定义特性的基类型。
        //
        // 返回结果:
        //     对类型的单个自定义属性的引用 attributeType 应用于 element, ,或 null 如果没有这样的属性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType 不源自 System.Attribute。
        //
        //   T:System.Reflection.AmbiguousMatchException:
        //     找到多个请求的属性。
        public static Attribute GetCustomAttribute(Module element, Type attributeType);
        //
        // 摘要:
        //     检索应用于方法参数的自定义特性。 参数指定的方法参数,以及要搜索的自定义属性的类型。
        //
        // 参数:
        //   element:
        //     一个对象派生自System.Reflection.ParameterInfo类,用于描述类的成员的参数。
        //
        //   attributeType:
        //     类型或要搜索的自定义属性的基类型。
        //
        // 返回结果:
        //     对类型的单个自定义属性的引用attributeType,可应用于element,或null如果没有此类的属性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType不派生自System.Attribute。
        //
        //   T:System.Reflection.AmbiguousMatchException:
        //     找到多个请求的属性之一。
        //
        //   T:System.TypeLoadException:
        //     无法加载自定义属性类型。
        public static Attribute GetCustomAttribute(ParameterInfo element, Type attributeType);
        //
        // 摘要:
        //     检索应用于方法参数的自定义特性。 参数指定的方法参数、 自定义属性来进行搜索,以及是否要搜索祖先构成的方法参数的类型。
        //
        // 参数:
        //   element:
        //     一个对象派生自System.Reflection.ParameterInfo类,用于描述类的成员的参数。
        //
        //   attributeType:
        //     类型或要搜索的自定义属性的基类型。
        //
        //   inherit:
        //     如果true,指定对还搜索上级element自定义特性。
        //
        // 返回结果:
        //     对类型的单个自定义属性的引用attributeType,可应用于element,或null如果没有此类的属性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType不派生自System.Attribute。
        //
        //   T:System.Reflection.AmbiguousMatchException:
        //     找到多个请求的属性之一。
        //
        //   T:System.TypeLoadException:
        //     无法加载自定义属性类型。
        public static Attribute GetCustomAttribute(ParameterInfo element, Type attributeType, bool inherit);
        //
        // 摘要:
        //     检索一个数组,它由应用于程序集的自定义属性组成。 参数指定该程序集,并忽略的搜索选项。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Assembly 类的对象,用于描述模块的可重用集合。
        //
        //   inherit:
        //     此参数将被忽略,并且不会影响此方法的操作。
        //
        // 返回结果:
        //     一个 System.Attribute 数组,其中包含应用于 element 的自定义属性;如果不存在任何此类自定义属性,则为空数组。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        public static Attribute[] GetCustomAttributes(Assembly element, bool inherit);
        //
        // 摘要:
        //     检索一个数组,它由应用于程序集的自定义属性组成。 参数指定程序集。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Assembly 类的对象,用于描述模块的可重用集合。
        //
        // 返回结果:
        //     一个 System.Attribute 数组,其中包含应用于 element 的自定义属性;如果不存在任何此类自定义属性,则为空数组。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 为 null。
        public static Attribute[] GetCustomAttributes(Assembly element);
        //
        // 摘要:
        //     检索一个数组,它由应用于程序集的自定义属性组成。 参数指定的程序集、 类型的自定义属性来进行搜索,并忽略的搜索选项。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Assembly 类的对象,用于描述模块的可重用集合。
        //
        //   attributeType:
        //     类型或要搜索的自定义属性的基类型。
        //
        //   inherit:
        //     此参数将被忽略,并且不会影响此方法的操作。
        //
        // 返回结果:
        //     System.Attribute数组,其中包含类型的自定义属性attributeType应用于element,则为空数组,如果不存在任何此类自定义特性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType不派生自System.Attribute。
        public static Attribute[] GetCustomAttributes(Assembly element, Type attributeType, bool inherit);
        //
        // 摘要:
        //     检索一个数组,它由应用于程序集的自定义属性组成。 参数指定要搜索的程序集和自定义特性的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Assembly 类的对象,用于描述模块的可重用集合。
        //
        //   attributeType:
        //     类型或要搜索的自定义属性的基类型。
        //
        // 返回结果:
        //     System.Attribute数组,其中包含类型的自定义属性attributeType应用于element,则为空数组,如果不存在任何此类自定义特性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType不派生自System.Attribute。
        public static Attribute[] GetCustomAttributes(Assembly element, Type attributeType);
        //
        // 摘要:
        //     检索应用于模块的自定义特性的数组。 参数指定该模块、 自定义特性来进行搜索,并忽略的搜索选项的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Module 类,用于描述可移植可执行文件。
        //
        //   attributeType:
        //     类型或要搜索的自定义特性的基类型。
        //
        //   inherit:
        //     此参数将被忽略,并不会影响此方法的操作。
        //
        // 返回结果:
        //     System.Attribute 数组,其中包含类型的自定义特性 attributeType 应用于 element, ,则为空数组,如果不存在任何此类自定义特性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType 不源自 System.Attribute。
        public static Attribute[] GetCustomAttributes(Module element, Type attributeType, bool inherit);
        //
        // 摘要:
        //     检索应用于模块的自定义特性的数组。 参数指定的模块。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Module 类,用于描述可移植可执行文件。
        //
        // 返回结果:
        //     一个 System.Attribute 数组,其中包含应用于 element 的自定义属性;如果不存在任何此类自定义属性,则为空数组。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 为 null。
        public static Attribute[] GetCustomAttributes(Module element);
        //
        // 摘要:
        //     检索应用于模块的自定义特性的数组。 参数指定该模块,并忽略的搜索选项。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Module 类,用于描述可移植可执行文件。
        //
        //   inherit:
        //     此参数将被忽略,并不会影响此方法的操作。
        //
        // 返回结果:
        //     一个 System.Attribute 数组,其中包含应用于 element 的自定义属性;如果不存在任何此类自定义属性,则为空数组。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        public static Attribute[] GetCustomAttributes(Module element, bool inherit);
        //
        // 摘要:
        //     检索应用于类型的成员的自定义特性的数组。 参数指定该成员和要搜索的自定义属性的类型。
        //
        // 参数:
        //   element:
        //     一个对象派生自System.Reflection.MemberInfo类,用于描述类的构造函数、 事件、 字段、 方法或属性的成员。
        //
        //   type:
        //     类型或要搜索的自定义属性的基类型。
        //
        // 返回结果:
        //     System.Attribute数组,其中包含类型的自定义属性type应用于element,则为空数组,如果不存在任何此类自定义特性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 type 为 null。
        //
        //   T:System.ArgumentException:
        //     type不派生自System.Attribute。
        //
        //   T:System.NotSupportedException:
        //     element不是构造函数、 方法、 属性、 事件、 类型或字段。
        //
        //   T:System.TypeLoadException:
        //     无法加载自定义属性类型。
        public static Attribute[] GetCustomAttributes(MemberInfo element, Type type);
        //
        // 摘要:
        //     检索应用于类型的成员的自定义特性的数组。 参数指定该成员、 自定义属性来进行搜索,以及是否要搜索的成员的祖先的类型。
        //
        // 参数:
        //   element:
        //     一个对象派生自System.Reflection.MemberInfo类,用于描述类的构造函数、 事件、 字段、 方法或属性的成员。
        //
        //   type:
        //     类型或要搜索的自定义属性的基类型。
        //
        //   inherit:
        //     如果true,指定对还搜索上级element自定义特性。
        //
        // 返回结果:
        //     System.Attribute数组,其中包含类型的自定义属性type应用于element,则为空数组,如果不存在任何此类自定义特性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 type 为 null。
        //
        //   T:System.ArgumentException:
        //     type不派生自System.Attribute。
        //
        //   T:System.NotSupportedException:
        //     element不是构造函数、 方法、 属性、 事件、 类型或字段。
        //
        //   T:System.TypeLoadException:
        //     无法加载自定义属性类型。
        public static Attribute[] GetCustomAttributes(MemberInfo element, Type type, bool inherit);
        //
        // 摘要:
        //     检索应用于类型的成员的自定义特性的数组。 参数指定的成员。
        //
        // 参数:
        //   element:
        //     一个对象派生自System.Reflection.MemberInfo类,用于描述类的构造函数、 事件、 字段、 方法或属性的成员。
        //
        // 返回结果:
        //     一个 System.Attribute 数组,其中包含应用于 element 的自定义属性;如果不存在任何此类自定义属性,则为空数组。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 为 null。
        //
        //   T:System.NotSupportedException:
        //     element不是构造函数、 方法、 属性、 事件、 类型或字段。
        //
        //   T:System.TypeLoadException:
        //     无法加载自定义属性类型。
        public static Attribute[] GetCustomAttributes(MemberInfo element);
        //
        // 摘要:
        //     检索应用于类型的成员的自定义特性的数组。 参数指定该成员、 自定义属性来进行搜索,以及是否要搜索的成员的祖先的类型。
        //
        // 参数:
        //   element:
        //     一个对象派生自System.Reflection.MemberInfo类,用于描述类的构造函数、 事件、 字段、 方法或属性的成员。
        //
        //   inherit:
        //     如果true,指定对还搜索上级element自定义特性。
        //
        // 返回结果:
        //     一个 System.Attribute 数组,其中包含应用于 element 的自定义属性;如果不存在任何此类自定义属性,则为空数组。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 为 null。
        //
        //   T:System.NotSupportedException:
        //     element不是构造函数、 方法、 属性、 事件、 类型或字段。
        //
        //   T:System.TypeLoadException:
        //     无法加载自定义属性类型。
        public static Attribute[] GetCustomAttributes(MemberInfo element, bool inherit);
        //
        // 摘要:
        //     检索应用于方法参数的自定义特性的数组。 参数指定的方法参数,以及是否搜索方法参数的祖先。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.ParameterInfo 类,用于描述类的成员的参数。
        //
        //   inherit:
        //     如果 true, ,与还搜索指定的祖先 element 的自定义属性。
        //
        // 返回结果:
        //     一个 System.Attribute 数组,其中包含应用于 element 的自定义属性;如果不存在任何此类自定义属性,则为空数组。
        //
        // 异常:
        //   T:System.ArgumentException:
        //     System.Reflection.ParameterInfo.Member 属性 element 是 null.
        //
        //   T:System.ArgumentNullException:
        //     element 为 null。
        //
        //   T:System.TypeLoadException:
        //     无法加载自定义特性类型。
        public static Attribute[] GetCustomAttributes(ParameterInfo element, bool inherit);
        //
        // 摘要:
        //     检索应用于方法参数的自定义特性的数组。 参数指定的方法参数、 自定义特性来进行搜索,以及是否要搜索的方法参数的祖先的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.ParameterInfo 类,用于描述类的成员的参数。
        //
        //   attributeType:
        //     类型或要搜索的自定义特性的基类型。
        //
        //   inherit:
        //     如果 true, ,与还搜索指定的祖先 element 的自定义属性。
        //
        // 返回结果:
        //     System.Attribute 数组,其中包含类型的自定义特性 attributeType 应用于 element, ,则为空数组,如果不存在任何此类自定义特性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType 不源自 System.Attribute。
        //
        //   T:System.TypeLoadException:
        //     无法加载自定义特性类型。
        public static Attribute[] GetCustomAttributes(ParameterInfo element, Type attributeType, bool inherit);
        //
        // 摘要:
        //     检索应用于方法参数的自定义特性的数组。 参数指定的方法参数,以及要搜索的自定义特性的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.ParameterInfo 类,用于描述类的成员的参数。
        //
        //   attributeType:
        //     类型或要搜索的自定义特性的基类型。
        //
        // 返回结果:
        //     System.Attribute 数组,其中包含类型的自定义特性 attributeType 应用于 element, ,则为空数组,如果不存在任何此类自定义特性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType 不源自 System.Attribute。
        //
        //   T:System.TypeLoadException:
        //     无法加载自定义特性类型。
        public static Attribute[] GetCustomAttributes(ParameterInfo element, Type attributeType);
        //
        // 摘要:
        //     检索应用于方法参数的自定义特性的数组。 一个参数指定的方法参数。
        //
        // 参数:
        //   element:
        //     一个对象派生自System.Reflection.ParameterInfo类,用于描述类的成员的参数。
        //
        // 返回结果:
        //     一个 System.Attribute 数组,其中包含应用于 element 的自定义属性;如果不存在任何此类自定义属性,则为空数组。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 为 null。
        //
        //   T:System.TypeLoadException:
        //     无法加载自定义属性类型。
        public static Attribute[] GetCustomAttributes(ParameterInfo element);
        //
        // 摘要:
        //     检索应用于模块的自定义特性的数组。 参数指定该模块,以及要搜索的自定义特性的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Module 类,用于描述可移植可执行文件。
        //
        //   attributeType:
        //     类型或要搜索的自定义特性的基类型。
        //
        // 返回结果:
        //     System.Attribute 数组,其中包含类型的自定义特性 attributeType 应用于 element, ,则为空数组,如果不存在任何此类自定义特性。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType 不源自 System.Attribute。
        public static Attribute[] GetCustomAttributes(Module element, Type attributeType);
        //
        // 摘要:
        //     确定是否将任何自定义特性应用于程序集。 参数指定的程序集、 自定义特性来进行搜索,并忽略的搜索选项的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Assembly 类的对象,用于描述模块的可重用集合。
        //
        //   attributeType:
        //     类型或要搜索的自定义特性的基类型。
        //
        //   inherit:
        //     此参数将被忽略,并不会影响此方法的操作。
        //
        // 返回结果:
        //     true 如果类型的自定义属性 attributeType 应用于 element; 否则为 false。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType 不源自 System.Attribute。
        public static bool IsDefined(Assembly element, Type attributeType, bool inherit);
        //
        // 摘要:
        //     确定是否将任何自定义特性应用于程序集。 参数指定要搜索的程序集和自定义特性的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Assembly 类的对象,用于描述模块的可重用集合。
        //
        //   attributeType:
        //     类型或要搜索的自定义属性的基类型。
        //
        // 返回结果:
        //     true如果类型的自定义特性attributeType应用于element; 否则为false。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType不派生自System.Attribute。
        public static bool IsDefined(Assembly element, Type attributeType);
        //
        // 摘要:
        //     确定是否将任何自定义特性应用于类型的成员。 参数指定要搜索的成员和自定义特性的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.MemberInfo 类,用于描述类的构造函数、 事件、 字段、 方法、 类型或属性的成员。
        //
        //   attributeType:
        //     类型或要搜索的自定义特性的基类型。
        //
        // 返回结果:
        //     true 如果类型的自定义属性 attributeType 应用于 element; 否则为 false。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType 不源自 System.Attribute。
        //
        //   T:System.NotSupportedException:
        //     element 不是构造函数、 方法、 属性、 事件、 类型或字段。
        public static bool IsDefined(MemberInfo element, Type attributeType);
        //
        // 摘要:
        //     确定是否将任何自定义特性应用于模块。 参数指定该模块、 自定义特性来进行搜索,并忽略的搜索选项的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Module 类,用于描述可移植可执行文件。
        //
        //   attributeType:
        //     类型或要搜索的自定义特性的基类型。
        //
        //   inherit:
        //     此参数将被忽略,并不会影响此方法的操作。
        //
        // 返回结果:
        //     true 如果类型的自定义属性 attributeType 应用于 element; 否则为 false。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType 不源自 System.Attribute。
        public static bool IsDefined(Module element, Type attributeType, bool inherit);
        //
        // 摘要:
        //     确定是否将具有指定任何的类型自定义特性应用于模块。 参数指定该模块,以及要搜索的自定义特性的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.Module 类,用于描述可移植可执行文件。
        //
        //   attributeType:
        //     类型或要搜索的自定义特性的基类型。
        //
        // 返回结果:
        //     true 如果类型的自定义属性 attributeType 应用于 element; 否则为 false。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType 不源自 System.Attribute。
        public static bool IsDefined(Module element, Type attributeType);
        //
        // 摘要:
        //     确定是否将任何自定义特性应用于方法参数。 参数指定的方法参数,以及要搜索的自定义特性的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.ParameterInfo 类,用于描述类的成员的参数。
        //
        //   attributeType:
        //     类型或要搜索的自定义特性的基类型。
        //
        // 返回结果:
        //     true 如果类型的自定义属性 attributeType 应用于 element; 否则为 false。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType 不源自 System.Attribute。
        public static bool IsDefined(ParameterInfo element, Type attributeType);
        //
        // 摘要:
        //     确定是否将任何自定义特性应用于类型的成员。 参数指定该成员、 自定义属性来进行搜索,以及是否要搜索的成员的祖先的类型。
        //
        // 参数:
        //   element:
        //     一个对象派生自System.Reflection.MemberInfo类,用于描述类的构造函数、 事件、 字段、 方法、 类型或属性的成员。
        //
        //   attributeType:
        //     类型或要搜索的自定义属性的基类型。
        //
        //   inherit:
        //     如果true,指定对还搜索上级element自定义特性。
        //
        // 返回结果:
        //     true如果类型的自定义特性attributeType应用于element; 否则为false。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType不派生自System.Attribute。
        //
        //   T:System.NotSupportedException:
        //     element不是构造函数、 方法、 属性、 事件、 类型或字段。
        public static bool IsDefined(MemberInfo element, Type attributeType, bool inherit);
        //
        // 摘要:
        //     确定是否将任何自定义特性应用于方法参数。 参数指定的方法参数、 自定义特性来进行搜索,以及是否要搜索的方法参数的祖先的类型。
        //
        // 参数:
        //   element:
        //     一个派生自 System.Reflection.ParameterInfo 类,用于描述类的成员的参数。
        //
        //   attributeType:
        //     类型或要搜索的自定义特性的基类型。
        //
        //   inherit:
        //     如果 true, ,与还搜索指定的祖先 element 的自定义属性。
        //
        // 返回结果:
        //     true 如果类型的自定义属性 attributeType 应用于 element; 否则为 false。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     element 或 attributeType 为 null。
        //
        //   T:System.ArgumentException:
        //     attributeType 不源自 System.Attribute。
        //
        //   T:System.ExecutionEngineException:
        //     element 不是方法、 构造函数或类型。
        public static bool IsDefined(ParameterInfo element, Type attributeType, bool inherit);
        //
        // 摘要:
        //     返回一个值,该值指示此实例是否与指定的对象相等。
        //
        // 参数:
        //   obj:
        //     System.Object 要与此实例进行比较或 null。
        //
        // 返回结果:
        //     如果 true 等于此实例的类型和值,则为 obj;否则为 false。
        [SecuritySafeCriticalAttribute]
        public override bool Equals(object obj);
        //
        // 摘要:
        //     返回此实例的哈希代码。
        //
        // 返回结果:
        //     32 位有符号整数哈希代码。
        [SecuritySafeCriticalAttribute]
        public override int GetHashCode();
        //
        // 摘要:
        //     在派生类中重写时,指示此实例的值是否是派生类的默认值。
        //
        // 返回结果:
        //     如果此实例是该类的默认属性,则为 true;否则为 false。
        public virtual bool IsDefaultAttribute();
        //
        // 摘要:
        //     当在派生类中重写,则返回一个值,该值指示此实例是否等于指定的对象。
        //
        // 参数:
        //   obj:
        //     System.Object要与此实例进行比较System.Attribute。
        //
        // 返回结果:
        //     true如果此实例等于obj; 否则为false。
        public virtual bool Match(object obj);
    }
}
2、
2.返回顶部
 
3.返回顶部
 
4.返回顶部
 
5.返回顶部
 
 
6.返回顶部
 
warn 作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

猜你喜欢

转载自www.cnblogs.com/storebook/p/12677736.html