OpenTAP 9.24
API Reference
Static Public Member Functions | List of all members
OpenTap.ReflectionDataExtensions Class Reference

Helpers for work with ITypeInfo objects. More...

Static Public Member Functions

static object CreateInstance (this ITypeData type)
 Creates an instance of this type using the default constructor.
 
static bool DescendsTo (this ITypeData type, ITypeData basetype)
 returns true if 'type' is a descendant of 'basetype'. More...
 
static bool DescendsTo (this ITypeData type, Type basetype)
 returns tru if 'type' is a descendant of 'basetype'. More...
 
static bool HasAttribute< T > (this IReflectionData mem)
 Returns true if a reflection ifno has an attribute of type T. More...
 
static T GetAttribute< T > (this IReflectionData mem)
 Gets the attribute of type T from mem. More...
 
static IEnumerable< T > GetAttributes< T > (this IReflectionData mem)
 Gets all the attributes of type T. More...
 
static DisplayAttribute GetDisplayAttribute (this IReflectionData mem)
 Gets the display attribute of mem. More...
 

Detailed Description

Helpers for work with ITypeInfo objects.

Member Function Documentation

◆ DescendsTo() [1/2]

static bool OpenTap.ReflectionDataExtensions.DescendsTo ( this ITypeData  type,
ITypeData  basetype 
)
inlinestatic

returns true if 'type' is a descendant of 'basetype'.

Parameters
type
basetype
Returns

◆ DescendsTo() [2/2]

static bool OpenTap.ReflectionDataExtensions.DescendsTo ( this ITypeData  type,
Type  basetype 
)
inlinestatic

returns tru if 'type' is a descendant of 'basetype'.

Parameters
type
basetype
Returns

◆ GetAttribute&lt; T &gt;()

static T OpenTap.ReflectionDataExtensions.GetAttribute< T > ( this IReflectionData  mem)
inlinestatic

Gets the attribute of type T from mem.

Template Parameters
T
Parameters
mem
Returns

◆ GetAttributes&lt; T &gt;()

static IEnumerable< T > OpenTap.ReflectionDataExtensions.GetAttributes< T > ( this IReflectionData  mem)
inlinestatic

Gets all the attributes of type T.

Template Parameters
T
Parameters
mem
Returns

◆ GetDisplayAttribute()

static DisplayAttribute OpenTap.ReflectionDataExtensions.GetDisplayAttribute ( this IReflectionData  mem)
inlinestatic

Gets the display attribute of mem.

Parameters
mem
Returns

◆ HasAttribute&lt; T &gt;()

static bool OpenTap.ReflectionDataExtensions.HasAttribute< T > ( this IReflectionData  mem)
inlinestatic

Returns true if a reflection ifno has an attribute of type T.

Template Parameters
T
Parameters
mem
Returns
Type Constraints
T :class 

OpenTAP 9.24 API built Tue Apr 30 2024 13:44:42