CustomAttributeLoaderLoadCustomAttributesT Method |
Loads custom attributes of the specified type for the given resource.
Namespace: Microsoft.ClearScriptAssembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5
Syntax public virtual T[] LoadCustomAttributes<T>(
ICustomAttributeProvider resource,
bool inherit
)
where T : Attribute
Public Overridable Function LoadCustomAttributes(Of T As Attribute) (
resource As ICustomAttributeProvider,
inherit As Boolean
) As T()
public:
generic<typename T>
where T : Attribute
virtual array<T>^ LoadCustomAttributes(
ICustomAttributeProvider^ resource,
bool inherit
)
abstract LoadCustomAttributes :
resource : ICustomAttributeProvider *
inherit : bool -> 'T[] when 'T : Attribute
override LoadCustomAttributes :
resource : ICustomAttributeProvider *
inherit : bool -> 'T[] when '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
TAn 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