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.MethodWrapper Class Reference

The MethodWrapper class wraps a MethodInfo so that it may be used in a platform-independent manner. More...

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

Public Member Functions

 MethodWrapper (Type type, MethodInfo method)
 Construct a MethodWrapper for a Type and a MethodInfo. More...
 
 MethodWrapper (Type type, string methodName)
 Construct a MethodInfo for a given Type and method name. More...
 
IParameterInfo[] GetParameters ()
 Gets the parameters of the method. More...
 
Type[] GetGenericArguments ()
 Returns the Type arguments of a generic method or the Type parameters of a generic method definition. More...
 
IMethodInfo MakeGenericMethod (params Type[] typeArguments)
 Replaces the type parameters of the method with the array of types provided and returns a new IMethodInfo. More...
 
T[] GetCustomAttributes< T > (bool inherit)
 Returns an array of custom attributes of the specified type applied to this method More...
 
bool IsDefined< T > (bool inherit)
 Gets a value indicating whether one or more attributes of the spcified type are defined on the method. More...
 
object Invoke (object fixture, params object[] args)
 Invokes the method, converting any TargetInvocationException to an NUnitException. More...
 
override string ToString ()
 Override ToString() so that error messages in NUnit's own tests make sense More...
 

Properties

ITypeInfo TypeInfo [get, private set]
 Gets the Type from which this method was reflected. More...
 
MethodInfo MethodInfo [get, private set]
 Gets the MethodInfo for this method. More...
 
string Name [get]
 Gets the name of the method. More...
 
bool IsAbstract [get]
 Gets a value indicating whether the method is abstract. More...
 
bool IsPublic [get]
 Gets a value indicating whether the method is public. More...
 
bool ContainsGenericParameters [get]
 Gets a value indicating whether the method contains unassigned generic type parameters. More...
 
bool IsGenericMethod [get]
 Gets a value indicating whether the method is a generic method. More...
 
bool IsGenericMethodDefinition [get]
 Gets a value indicating whether the MethodInfo represents the definition of a generic method. More...
 
ITypeInfo ReturnType [get]
 Gets the return Type of the method. More...
 
- Properties inherited from NUnit.Framework.Interfaces.IMethodInfo
ITypeInfo TypeInfo [get]
 Gets the Type from which this method was reflected. More...
 
MethodInfo MethodInfo [get]
 Gets the MethodInfo for this method. More...
 
string Name [get]
 Gets the name of the method. More...
 
bool IsAbstract [get]
 Gets a value indicating whether the method is abstract. More...
 
bool IsPublic [get]
 Gets a value indicating whether the method is public. More...
 
bool ContainsGenericParameters [get]
 Gets a value indicating whether the method contains unassigned generic type parameters. More...
 
bool IsGenericMethod [get]
 Gets a value indicating whether the method is a generic method. More...
 
bool IsGenericMethodDefinition [get]
 Gets a value indicating whether the MethodInfo represents the definition of a generic method. More...
 
ITypeInfo ReturnType [get]
 Gets the return Type of the method. More...
 

Detailed Description

The MethodWrapper class wraps a MethodInfo so that it may be used in a platform-independent manner.

Constructor & Destructor Documentation

NUnit.Framework.Internal.MethodWrapper.MethodWrapper ( Type  type,
MethodInfo  method 
)
inline

Construct a MethodWrapper for a Type and a MethodInfo.

NUnit.Framework.Internal.MethodWrapper.MethodWrapper ( Type  type,
string  methodName 
)
inline

Construct a MethodInfo for a given Type and method name.

Member Function Documentation

IParameterInfo [] NUnit.Framework.Internal.MethodWrapper.GetParameters ( )
inline

Gets the parameters of the method.

Returns

Implements NUnit.Framework.Interfaces.IMethodInfo.

Type [] NUnit.Framework.Internal.MethodWrapper.GetGenericArguments ( )
inline

Returns the Type arguments of a generic method or the Type parameters of a generic method definition.

Implements NUnit.Framework.Interfaces.IMethodInfo.

IMethodInfo NUnit.Framework.Internal.MethodWrapper.MakeGenericMethod ( params Type[]  typeArguments)
inline

Replaces the type parameters of the method with the array of types provided and returns a new IMethodInfo.

Parameters
typeArgumentsThe type arguments to be used
Returns
A new IMethodInfo with the type arguments replaced

Implements NUnit.Framework.Interfaces.IMethodInfo.

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

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

Implements NUnit.Framework.Interfaces.IReflectionInfo.

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

Gets a value indicating whether one or more attributes of the spcified type are defined on the method.

Implements NUnit.Framework.Interfaces.IReflectionInfo.

object NUnit.Framework.Internal.MethodWrapper.Invoke ( object  fixture,
params object[]  args 
)
inline

Invokes the method, converting any TargetInvocationException to an NUnitException.

Parameters
fixtureThe object on which to invoke the method
argsThe argument list for the method
Returns
The return value from the invoked method

Implements NUnit.Framework.Interfaces.IMethodInfo.

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

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

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

Property Documentation

ITypeInfo NUnit.Framework.Internal.MethodWrapper.TypeInfo
getprivate set

Gets the Type from which this method was reflected.

MethodInfo NUnit.Framework.Internal.MethodWrapper.MethodInfo
getprivate set

Gets the MethodInfo for this method.

string NUnit.Framework.Internal.MethodWrapper.Name
get

Gets the name of the method.

bool NUnit.Framework.Internal.MethodWrapper.IsAbstract
get

Gets a value indicating whether the method is abstract.

bool NUnit.Framework.Internal.MethodWrapper.IsPublic
get

Gets a value indicating whether the method is public.

bool NUnit.Framework.Internal.MethodWrapper.ContainsGenericParameters
get

Gets a value indicating whether the method contains unassigned generic type parameters.

bool NUnit.Framework.Internal.MethodWrapper.IsGenericMethod
get

Gets a value indicating whether the method is a generic method.

bool NUnit.Framework.Internal.MethodWrapper.IsGenericMethodDefinition
get

Gets a value indicating whether the MethodInfo represents the definition of a generic method.

ITypeInfo NUnit.Framework.Internal.MethodWrapper.ReturnType
get

Gets the return Type of the method.


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