IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
The TypeWrapper class wraps a Type so it may be used in a platform-independent manner. More...
Public Member Functions | |
TypeWrapper (Type type) | |
Construct a TypeWrapper for a specified Type. More... | |
bool | IsType (Type type) |
Returns true if the Type wrapped is T More... | |
string | GetDisplayName () |
Get the display name for this type More... | |
string | GetDisplayName (object[] args) |
Get the display name for an object of this type, constructed with the specified args. More... | |
ITypeInfo | MakeGenericType (Type[] typeArgs) |
Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments More... | |
Type | GetGenericTypeDefinition () |
Returns a Type representing a generic type definition from which this Type can be constructed. More... | |
T[] | GetCustomAttributes< T > (bool inherit) |
Returns an array of custom attributes of the specified type applied to this type More... | |
bool | IsDefined< T > (bool inherit) |
Returns a value indicating whether the type has an attribute of the specified type. More... | |
bool | HasMethodWithAttribute (Type attributeType) |
Returns a flag indicating whether this type has a method with an attribute of the specified type. More... | |
IMethodInfo[] | GetMethods (BindingFlags flags) |
Returns an array of IMethodInfos for methods of this Type that match the specified flags. More... | |
bool | HasConstructor (Type[] argTypes) |
Returns a value indicating whether this Type has a public constructor taking the specified argument Types. More... | |
object | Construct (object[] args) |
Construct an object of this Type, using the specified arguments. More... | |
override string | ToString () |
Override ToString() so that error messages in NUnit's own tests make sense More... | |
Properties | |
Type | Type [get, private set] |
Gets the underlying Type on which this TypeWrapper is based. More... | |
ITypeInfo | BaseType [get] |
Gets the base type of this type as an ITypeInfo More... | |
string | Name [get] |
Gets the Name of the Type More... | |
string | FullName [get] |
Gets the FullName of the Type More... | |
Assembly | Assembly [get] |
Gets the assembly in which the type is declared More... | |
string | Namespace [get] |
Gets the namespace of the Type More... | |
bool | IsAbstract [get] |
Gets a value indicating whether the type is abstract. More... | |
bool | IsGenericType [get] |
Gets a value indicating whether the Type is a generic Type More... | |
bool | ContainsGenericParameters [get] |
Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. More... | |
bool | IsGenericTypeDefinition [get] |
Gets a value indicating whether the Type is a generic Type definition More... | |
bool | IsSealed [get] |
Gets a value indicating whether the type is sealed. More... | |
bool | IsStaticClass [get] |
Gets a value indicating whether this type represents a static class. More... | |
![]() | |
Type | Type [get] |
Gets the underlying Type on which this ITypeInfo is based More... | |
ITypeInfo | BaseType [get] |
Gets the base type of this type as an ITypeInfo More... | |
string | Name [get] |
Gets the Name of the Type More... | |
string | FullName [get] |
Gets the FullName of the Type More... | |
Assembly | Assembly [get] |
Gets the assembly in which the type is declared More... | |
string | Namespace [get] |
Gets the Namespace of the Type More... | |
bool | IsAbstract [get] |
Gets a value indicating whether the type is abstract. More... | |
bool | IsGenericType [get] |
Gets a value indicating whether the Type is a generic Type More... | |
bool | ContainsGenericParameters [get] |
Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. More... | |
bool | IsGenericTypeDefinition [get] |
Gets a value indicating whether the Type is a generic Type definition More... | |
bool | IsSealed [get] |
Gets a value indicating whether the type is sealed. More... | |
bool | IsStaticClass [get] |
Gets a value indicating whether this type is a static class. More... | |
The TypeWrapper class wraps a Type so it may be used in a platform-independent manner.
|
inline |
Construct a TypeWrapper for a specified Type.
|
inline |
Returns true if the Type wrapped is T
Implements NUnit.Framework.Interfaces.ITypeInfo.
|
inline |
Get the display name for this type
Implements NUnit.Framework.Interfaces.ITypeInfo.
References NUnit.Framework.Internal.TypeHelper.GetDisplayName().
|
inline |
Get the display name for an object of this type, constructed with the specified args.
Implements NUnit.Framework.Interfaces.ITypeInfo.
References NUnit.Framework.Internal.TypeHelper.GetDisplayName().
Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments
Implements NUnit.Framework.Interfaces.ITypeInfo.
|
inline |
Returns a Type representing a generic type definition from which this Type can be constructed.
Implements NUnit.Framework.Interfaces.ITypeInfo.
|
inline |
Returns an array of custom attributes of the specified type applied to this type
Implements NUnit.Framework.Interfaces.IReflectionInfo.
T | : | class |
|
inline |
Returns a value indicating whether the type has an attribute of the specified type.
T |
inherit |
Implements NUnit.Framework.Interfaces.IReflectionInfo.
|
inline |
Returns a flag indicating whether this type has a method with an attribute of the specified type.
attributeType |
Implements NUnit.Framework.Interfaces.ITypeInfo.
References NUnit.Framework.Internal.Reflect.HasMethodWithAttribute().
|
inline |
Returns an array of IMethodInfos for methods of this Type that match the specified flags.
Implements NUnit.Framework.Interfaces.ITypeInfo.
|
inline |
Returns a value indicating whether this Type has a public constructor taking the specified argument Types.
Implements NUnit.Framework.Interfaces.ITypeInfo.
|
inline |
Construct an object of this Type, using the specified arguments.
Implements NUnit.Framework.Interfaces.ITypeInfo.
References NUnit.Framework.Internal.Reflect.Construct().
|
inline |
Override ToString() so that error messages in NUnit's own tests make sense
|
getprivate set |
Gets the underlying Type on which this TypeWrapper is based.
|
get |
Gets the base type of this type as an ITypeInfo
|
get |
Gets the Name of the Type
|
get |
Gets the FullName of the Type
|
get |
Gets the assembly in which the type is declared
|
get |
Gets the namespace of the Type
|
get |
Gets a value indicating whether the type is abstract.
|
get |
Gets a value indicating whether the Type is a generic Type
|
get |
Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types.
|
get |
Gets a value indicating whether the Type is a generic Type definition
|
get |
Gets a value indicating whether the type is sealed.
|
get |
Gets a value indicating whether this type represents a static class.