InjectionTargetInfoGetCustomAttributeT Method (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 T GetCustomAttribute<T>(
	bool inherit
)
where T : Attribute

Parameters

inherit
Type: SystemBoolean
True to inspect the ancestors of element; otherwise, false.

Type Parameters

T
The parameter to inspect.The parameter to inspect.

Return Value

Type: T
A custom attribute that matches T, or null if no such attribute is found.
See Also

Reference