TRttiObjectHelper.GetCustomAttribute<T> Method

Overloads

GetCustomAttribute(TAttributeClass, Boolean)
GetCustomAttribute<T>(Boolean)

Enumerates all applied custom attributes and returns the first one which is/inherits the specified type.

GetCustomAttribute(TAttributeClass, Boolean)

Delphi
function GetCustomAttribute(attributeClass: TAttributeClass; inherit: Boolean = False): TCustomAttribute

Parameters

attributeClass
TAttributeClass
inherit
Boolean

Returns

TCustomAttribute

GetCustomAttribute<T>(Boolean)

Enumerates all applied custom attributes and returns the first one which is/inherits the specified type.

Delphi
function GetCustomAttribute<T>(inherit: Boolean = False): T

Type Parameters

T

Parameters

inherit
Boolean

Returns

T