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.4
Syntax
public virtual T[] LoadCustomAttributes<T>(
	ICustomAttributeProvider resource,
	bool inherit
)
where T : Attribute

Parameters

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

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

Return Value

T
An array of custom attributes of type T.
Remarks
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