InjectionTargetInfoGetCustomAttributesT Method (Boolean)

Simple Injector
Retrieves a collection of custom attributes of a specified type that are 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 IEnumerable<T> GetCustomAttributes<T>(
	bool inherit
)
where T : Attribute

Parameters

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

Type Parameters

T
The type of attribute to search for.

Return Value

Type: IEnumerableT
A collection of the custom attributes that are applied to element and that match T, or an empty collection if no such attributes exist.
See Also

Reference