ICustomAttributeProvider 接口

定义

为支持自定义属性的反映对象提供自定义属性。

public interface class ICustomAttributeProvider
public interface ICustomAttributeProvider
[System.Runtime.InteropServices.ComVisible(true)]
public interface ICustomAttributeProvider
type ICustomAttributeProvider = interface
[<System.Runtime.InteropServices.ComVisible(true)>]
type ICustomAttributeProvider = interface
Public Interface ICustomAttributeProvider
派生
属性

注解

几乎所有反射类都可以具有与其关联的属性。 属性可以是标准 (公共、专用、HelpString) 或自定义属性。

方法

GetCustomAttributes(Boolean)

返回在该成员上定义的所有自定义特性的数组(已命名的特性除外),如果没有自定义特性,则返回空数组。

GetCustomAttributes(Type, Boolean)

返回在该成员上定义、由类型标识的自定义属性数组,如果没有该类型的自定义属性,则返回空数组。

IsDefined(Type, Boolean)

指示是否在该成员上定义了一个或多个 attributeType 实例。

适用于