ICustomAttributeProvider ICustomAttributeProvider ICustomAttributeProvider ICustomAttributeProvider Interface

定义

为支持自定义属性的反映对象提供自定义属性。Provides custom attributes for reflection objects that support them.

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

注解

几乎所有反射类可以都有与之关联的属性。Nearly all the Reflection classes can have attributes associated with them. 属性可以是标准 (公共、 私有、 HelpString) 或自定义。Attributes can be standard (public, private, HelpString) or custom.

方法

GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean)

返回在该成员上定义的所有自定义特性的数组(已命名的特性除外),如果没有自定义特性,则返回空数组。Returns an array of all of the custom attributes defined on this member, excluding named attributes, or an empty array if there are no custom attributes.

GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean)

返回在该成员上定义、由类型标识的自定义属性数组,如果没有该类型的自定义属性,则返回空数组。Returns an array of custom attributes defined on this member, identified by type, or an empty array if there are no custom attributes of that type.

IsDefined(Type, Boolean) IsDefined(Type, Boolean) IsDefined(Type, Boolean) IsDefined(Type, Boolean)

指示是否在该成员上定义了一个或多个 attributeType 实例。Indicates whether one or more instance of attributeType is defined on this member.

适用于