Dela via


AttributeTableContainer.GetAttributes Method (Assembly, Type, Func<Object, Object>)

Enumerates the attributes of the specified assembly.

Namespace:  Microsoft.Windows.Design.Metadata
Assembly:  Microsoft.Windows.Design.Extensibility (in Microsoft.Windows.Design.Extensibility.dll)

Syntax

'Declaration
Public Function GetAttributes ( _
    assembly As Assembly, _
    attributeType As Type, _
    reflectionMapper As Func(Of Object, Object) _
) As IEnumerable(Of Object)
public IEnumerable<Object> GetAttributes(
    Assembly assembly,
    Type attributeType,
    Func<Object, Object> reflectionMapper
)
public:
IEnumerable<Object^>^ GetAttributes(
    Assembly^ assembly, 
    Type^ attributeType, 
    Func<Object^, Object^>^ reflectionMapper
)
member GetAttributes : 
        assembly:Assembly * 
        attributeType:Type * 
        reflectionMapper:Func<Object, Object> -> IEnumerable<Object> 
public function GetAttributes(
    assembly : Assembly, 
    attributeType : Type, 
    reflectionMapper : Func<Object, Object>
) : IEnumerable<Object>

Parameters

  • attributeType
    Type: System.Type
    The attribute type to enumerate or nulla null reference (Nothing in Visual Basic) to enumerate all attributes.
  • reflectionMapper
    Type: System.Func<Object, Object>
    An optional mapping function to map the incoming reflection metadata to runtime metadata.

Return Value

Type: System.Collections.Generic.IEnumerable<Object>
An enumeration of attributes.

Exceptions

Exception Condition
ArgumentNullException

assembly is nulla null reference (Nothing in Visual Basic).

Remarks

The returned attributes include attributes defined in the actual assembly, and also attributes defined in attribute tables that have been added to this container. Attributes defined in attribute tables take precedence over attributes defined in the assembly.

.NET Framework Security

See Also

Reference

AttributeTableContainer Class

GetAttributes Overload

Microsoft.Windows.Design.Metadata Namespace