InjectionTargetInfoGetCustomAttribute Method (Type, Boolean)

Simple Injector
Retrieves a custom attribute of a specified type that is applied to a specified parameter, and optionally inspects the ancestors of that parameter.

Namespace:  SimpleInjector
Assembly:  SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax

public Attribute GetCustomAttribute(
	Type attributeType,
	bool inherit
)

Parameters

attributeType
Type: SystemType
The type of attribute to search for.
inherit
Type: SystemBoolean
True to inspect the ancestors of element; otherwise, false.

Return Value

Type: Attribute
A custom attribute matching attributeType, or null if no such attribute is found.
See Also

Reference