Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AttributeUtils.FindAttribute Method

Find a single Attribute of the type 'attributeType' from the supplied class, traversing it interfaces and super classes if no attribute can be found on the class iteslf.

[Visual Basic]
Public Shared Sub FindAttribute( _
   ByVal type As Type, _
   ByVal attributeType As Type _
)
[C#]
public static Attribute FindAttribute(
   Type type,
   Type attributeType
);

Parameters

type
The class to look for attributes on .
attributeType
Type of the attribibute to look for.

Return Value

the attribute of the given type found, or

null

Remarks

This method explicitly handles class-level attributes which are not declared as inherited as well as attributes on interfaces.

See Also

AttributeUtils Class | Spring.Util Namespace