AttributeTableContainer.GetLocalAttributes 方法 (MemberInfo, Type)

[本文档仅供预览,在以后的发行版中可能会发生更改。包含的空白主题用作占位符。]

枚举指定成员的自定义特性,包括基成员的继承特性。

命名空间:  Microsoft.Windows.Design.Metadata
程序集:  Microsoft.Windows.Design.Extensibility(在 Microsoft.Windows.Design.Extensibility.dll 中)

语法

声明
Public Function GetLocalAttributes ( _
    member As MemberInfo, _
    attributeType As Type _
) As IEnumerable(Of Object)
public IEnumerable<Object> GetLocalAttributes(
    MemberInfo member,
    Type attributeType
)
public:
IEnumerable<Object^>^ GetLocalAttributes(
    MemberInfo^ member, 
    Type^ attributeType
)
member GetLocalAttributes : 
        member:MemberInfo * 
        attributeType:Type -> IEnumerable<Object> 
public function GetLocalAttributes(
    member : MemberInfo, 
    attributeType : Type
) : IEnumerable<Object>

参数

  • attributeType
    类型:System.Type
    要检索的特性类型,或为 nulla null reference (Nothing in Visual Basic) 以检索所有特性。

返回值

类型:System.Collections.Generic.IEnumerable<Object>
特性的枚举。

异常

异常 条件
ArgumentNullException

member 为 nulla null reference (Nothing in Visual Basic)。

.NET Framework 安全性

请参见

参考

AttributeTableContainer 类

GetLocalAttributes 重载

Microsoft.Windows.Design.Metadata 命名空间