System.Reflection.CustomAttributeData.cs

ylbtech-System.Reflection.CustomAttributeData.cs
1.返回顶部
1、
#region 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.6.1mscorlib.dll
#endregion

using System.Collections.Generic;
using System.Runtime.InteropServices;

namespace System.Reflection
{
    //
    // 摘要:
    //     提供对加载到仅反射上下文的程序集、模块、类型、成员和参数的自定义属性数据的访问权限。
    [ComVisible(true)]
    public class CustomAttributeData
    {
        //
        // 摘要:
        //     初始化 System.Reflection.CustomAttributeData 类的新实例。
        protected CustomAttributeData();

        //
        // 摘要:
        //     获取该属性的类型。
        //
        // 返回结果:
        //     属性的类型。
        public Type AttributeType { get; }
        //
        // 摘要:
        //     获取一个 System.Reflection.ConstructorInfo 对象,表示应已初始化自定义属性的构造函数。
        //
        // 返回结果:
        //     一个对象,表示应已初始化由 System.Reflection.CustomAttributeData 类的当前实例表示的自定义属性的构造函数。
        [ComVisible(true)]
        public virtual ConstructorInfo Constructor { get; }
        //
        // 摘要:
        //     获取位置为指定的参数所表示的属性实例的列表 System.Reflection.CustomAttributeData 对象。
        //
        // 返回结果:
        //     这些结构表示为自定义特性实例指定的位置参数的集合。
        [ComVisible(true)]
        public virtual IList<CustomAttributeTypedArgument> ConstructorArguments { get; }
        //
        // 摘要:
        //     获取已命名为指定的参数所表示的属性实例的列表 System.Reflection.CustomAttributeData 对象。
        //
        // 返回结果:
        //     这些结构表示为自定义特性实例指定的命名的参数的集合。
        public virtual IList<CustomAttributeNamedArgument> NamedArguments { get; }

        //
        // 摘要:
        //     返回 System.Reflection.CustomAttributeData 对象列表,这些对象表示已应用到目标成员的特性相关数据。
        //
        // 参数:
        //   target:
        //     要检索其特性数据的成员。
        //
        // 返回结果:
        //     对象的列表,表示已应用到目标成员的特性相关数据。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     target 为 null。
        public static IList<CustomAttributeData> GetCustomAttributes(MemberInfo target);
        //
        // 摘要:
        //     返回 System.Reflection.CustomAttributeData 对象列表,这些对象表示已应用到目标模块的特性相关数据。
        //
        // 参数:
        //   target:
        //     要检索其自定义特性数据的模块。
        //
        // 返回结果:
        //     对象的列表,表示已应用到目标模块的特性相关数据。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     target 为 null。
        public static IList<CustomAttributeData> GetCustomAttributes(Module target);
        //
        // 摘要:
        //     返回 System.Reflection.CustomAttributeData 对象列表,这些对象表示已应用到目标程序集的特性相关数据。
        //
        // 参数:
        //   target:
        //     要检索其自定义特性数据的程序集。
        //
        // 返回结果:
        //     对象的列表,表示已应用到目标程序集的特性相关数据。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     target 为 null。
        public static IList<CustomAttributeData> GetCustomAttributes(Assembly target);
        //
        // 摘要:
        //     返回 System.Reflection.CustomAttributeData 对象列表,这些对象表示已应用到目标参数的特性相关数据。
        //
        // 参数:
        //   target:
        //     要检索其特性数据的参数。
        //
        // 返回结果:
        //     对象的列表,表示已应用到目标参数的特性相关数据。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     target 为 null。
        public static IList<CustomAttributeData> GetCustomAttributes(ParameterInfo target);
        //
        // 摘要:
        //     返回一个值,该值指示此实例是否与指定的对象相等。
        //
        // 参数:
        //   obj:
        //     与此实例进行比较的对象,或为 null。
        //
        // 返回结果:
        //     如果 obj 等于当前实例,则为 true;否则为 false。
        public override bool Equals(object obj);
        //
        // 摘要:
        //     用作特定类型的哈希函数。
        //
        // 返回结果:
        //     当前 System.Object 的哈希代码。
        public override int GetHashCode();
        //
        // 摘要:
        //     返回的字符串表示形式的自定义属性。
        //
        // 返回结果:
        //     一个表示自定义属性的字符串值。
        public override string ToString();
    }
}
2、
2.返回顶部
 
3.返回顶部
 
4.返回顶部
 
5.返回顶部
 
 
6.返回顶部
 
warn 作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
原文地址:https://www.cnblogs.com/storebook/p/12676690.html