Click or drag to resize

CustomAttributeLoaderLoadCustomAttributesT Method

Loads custom attributes of the specified type for the given resource.

Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5
public virtual T[] LoadCustomAttributes<T>(
	ICustomAttributeProvider resource,
	bool inherit
where T : Attribute


resource  ICustomAttributeProvider
The resource for which to load custom attributes of type T.
inherit  Boolean
True to include custom attributes of type T defined for ancestors of resource, false otherwise.

Type Parameters

The type, or a base type, of the custom attributes to load.

Return Value

An array of custom attributes of type T.
This method is performance-critical. Overrides must not invoke script engine methods or other ClearScript functionality. The base implementation loads custom attributes via reflection.
See Also