IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Framework.Internal.TypeWrapper Class Reference

The TypeWrapper class wraps a Type so it may be used in a platform-independent manner. More...

+ Inheritance diagram for NUnit.Framework.Internal.TypeWrapper:
+ Collaboration diagram for NUnit.Framework.Internal.TypeWrapper:

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...
 
- Properties inherited from NUnit.Framework.Interfaces.ITypeInfo
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...
 

Detailed Description

The TypeWrapper class wraps a Type so it may be used in a platform-independent manner.

Constructor & Destructor Documentation

NUnit.Framework.Internal.TypeWrapper.TypeWrapper ( Type  type)
inline

Construct a TypeWrapper for a specified Type.

Member Function Documentation

bool NUnit.Framework.Internal.TypeWrapper.IsType ( Type  type)
inline

Returns true if the Type wrapped is T

Implements NUnit.Framework.Interfaces.ITypeInfo.

string NUnit.Framework.Internal.TypeWrapper.GetDisplayName ( )
inline

Get the display name for this type

Implements NUnit.Framework.Interfaces.ITypeInfo.

References NUnit.Framework.Internal.TypeHelper.GetDisplayName().

string NUnit.Framework.Internal.TypeWrapper.GetDisplayName ( object[]  args)
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().

ITypeInfo NUnit.Framework.Internal.TypeWrapper.MakeGenericType ( Type[]  typeArgs)
inline

Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments

Implements NUnit.Framework.Interfaces.ITypeInfo.

Type NUnit.Framework.Internal.TypeWrapper.GetGenericTypeDefinition ( )
inline

Returns a Type representing a generic type definition from which this Type can be constructed.

Implements NUnit.Framework.Interfaces.ITypeInfo.

T [] NUnit.Framework.Internal.TypeWrapper.GetCustomAttributes< T > ( bool  inherit)
inline

Returns an array of custom attributes of the specified type applied to this type

Implements NUnit.Framework.Interfaces.IReflectionInfo.

Type Constraints
T :class 
bool NUnit.Framework.Internal.TypeWrapper.IsDefined< T > ( bool  inherit)
inline

Returns a value indicating whether the type has an attribute of the specified type.

Template Parameters
T
Parameters
inherit
Returns

Implements NUnit.Framework.Interfaces.IReflectionInfo.

bool NUnit.Framework.Internal.TypeWrapper.HasMethodWithAttribute ( Type  attributeType)
inline

Returns a flag indicating whether this type has a method with an attribute of the specified type.

Parameters
attributeType
Returns

Implements NUnit.Framework.Interfaces.ITypeInfo.

References NUnit.Framework.Internal.Reflect.HasMethodWithAttribute().

IMethodInfo [] NUnit.Framework.Internal.TypeWrapper.GetMethods ( BindingFlags  flags)
inline

Returns an array of IMethodInfos for methods of this Type that match the specified flags.

Implements NUnit.Framework.Interfaces.ITypeInfo.

bool NUnit.Framework.Internal.TypeWrapper.HasConstructor ( Type[]  argTypes)
inline

Returns a value indicating whether this Type has a public constructor taking the specified argument Types.

Implements NUnit.Framework.Interfaces.ITypeInfo.

object NUnit.Framework.Internal.TypeWrapper.Construct ( object[]  args)
inline

Construct an object of this Type, using the specified arguments.

Implements NUnit.Framework.Interfaces.ITypeInfo.

References NUnit.Framework.Internal.Reflect.Construct().

override string NUnit.Framework.Internal.TypeWrapper.ToString ( )
inline

Override ToString() so that error messages in NUnit's own tests make sense

Property Documentation

Type NUnit.Framework.Internal.TypeWrapper.Type
getprivate set

Gets the underlying Type on which this TypeWrapper is based.

ITypeInfo NUnit.Framework.Internal.TypeWrapper.BaseType
get

Gets the base type of this type as an ITypeInfo

string NUnit.Framework.Internal.TypeWrapper.Name
get

Gets the Name of the Type

string NUnit.Framework.Internal.TypeWrapper.FullName
get

Gets the FullName of the Type

Assembly NUnit.Framework.Internal.TypeWrapper.Assembly
get

Gets the assembly in which the type is declared

string NUnit.Framework.Internal.TypeWrapper.Namespace
get

Gets the namespace of the Type

bool NUnit.Framework.Internal.TypeWrapper.IsAbstract
get

Gets a value indicating whether the type is abstract.

bool NUnit.Framework.Internal.TypeWrapper.IsGenericType
get

Gets a value indicating whether the Type is a generic Type

bool NUnit.Framework.Internal.TypeWrapper.ContainsGenericParameters
get

Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types.

bool NUnit.Framework.Internal.TypeWrapper.IsGenericTypeDefinition
get

Gets a value indicating whether the Type is a generic Type definition

bool NUnit.Framework.Internal.TypeWrapper.IsSealed
get

Gets a value indicating whether the type is sealed.

bool NUnit.Framework.Internal.TypeWrapper.IsStaticClass
get

Gets a value indicating whether this type represents a static class.


The documentation for this class was generated from the following file: