AttributeTableContainer.GetLocalAttributes 方法 (MemberInfo, Type, Func<Object, Object>)

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

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

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

语法

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

参数

  • attributeType
    类型:System.Type
    要检索的特性类型,或为 nulla null reference (Nothing in Visual Basic) 以检索所有特性。
  • reflectionMapper
    类型:System.Func<Object, Object>
    可选的映射函数,用于将传入的反射元数据映射到运行时元数据。

返回值

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

异常

异常 条件
ArgumentNullException

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

.NET Framework 安全性

请参见

参考

AttributeTableContainer 类

GetLocalAttributes 重载

Microsoft.Windows.Design.Metadata 命名空间