Class AttributeHelper
- Namespace
- NUnit.Compatibility
- Assembly
- nunit.framework.dll
Provides a platform-independent methods for getting attributes for use by AttributeConstraint and AttributeExistsConstraint.
public static class AttributeHelper
- Inheritance
-
AttributeHelper
- Inherited Members
Methods
GetCustomAttributes(object, Type, bool)
Gets the custom attributes from the given object.
public static Attribute[] GetCustomAttributes(object actual, Type attributeType, bool inherit)
Parameters
actual
objectThe actual.
attributeType
TypeType of the attribute.
inherit
boolif set to true [inherit].
Returns
- Attribute[]
A list of the given attribute on the given object.