C# 클래스 NUnit.Framework.Internal.TypeHelper

TypeHelper provides static methods that operate on Types.
파일 보기 프로젝트 열기: pjcollins/Andr.Unit 1 사용 예제들

공개 메소드들

메소드 설명
BestCommonType ( Type type1, Type type2 ) : Type

Returns the best fit for a common type to be used in matching actual arguments to a methods Type parameters.

CanDeduceTypeArgsFromArgs ( Type type, object arglist, Type &typeArgsOut ) : bool

Determines whether this instance can deduce type args for a generic type from the supplied arguments.

ConvertArgumentList ( object arglist, ParameterInfo parameters ) : void

Convert an argument list to the required paramter types. Currently, only widening numeric conversions are performed.

GetDisplayName ( Type type ) : string

Gets the display name for a Type as used by NUnit.

GetDisplayName ( Type type, object arglist ) : string

Gets the display name for a Type as used by NUnit.

GetEnumValues ( Type enumType ) : Array

Gets the values for an enumeration, using Enum.GetTypes where available, otherwise through reflection.

IsNumeric ( Type type ) : bool

Determines whether the specified type is numeric.

MakeGenericType ( Type type, Type typeArgs ) : Type

Creates an instance of a generic Type using the supplied Type arguments

메소드 상세

BestCommonType() 공개 정적인 메소드

Returns the best fit for a common type to be used in matching actual arguments to a methods Type parameters.
public static BestCommonType ( Type type1, Type type2 ) : Type
type1 System.Type The first type.
type2 System.Type The second type.
리턴 System.Type

CanDeduceTypeArgsFromArgs() 공개 정적인 메소드

Determines whether this instance can deduce type args for a generic type from the supplied arguments.
public static CanDeduceTypeArgsFromArgs ( Type type, object arglist, Type &typeArgsOut ) : bool
type System.Type The type to be examined.
arglist object The arglist.
typeArgsOut System.Type The type args to be used.
리턴 bool

ConvertArgumentList() 공개 정적인 메소드

Convert an argument list to the required paramter types. Currently, only widening numeric conversions are performed.
public static ConvertArgumentList ( object arglist, ParameterInfo parameters ) : void
arglist object An array of args to be converted
parameters System.Reflection.ParameterInfo A ParamterInfo[] whose types will be used as targets
리턴 void

GetDisplayName() 공개 정적인 메소드

Gets the display name for a Type as used by NUnit.
public static GetDisplayName ( Type type ) : string
type System.Type The Type for which a display name is needed.
리턴 string

GetDisplayName() 공개 정적인 메소드

Gets the display name for a Type as used by NUnit.
public static GetDisplayName ( Type type, object arglist ) : string
type System.Type The Type for which a display name is needed.
arglist object The arglist provided.
리턴 string

GetEnumValues() 공개 정적인 메소드

Gets the values for an enumeration, using Enum.GetTypes where available, otherwise through reflection.
public static GetEnumValues ( Type enumType ) : Array
enumType System.Type
리턴 System.Array

IsNumeric() 공개 정적인 메소드

Determines whether the specified type is numeric.
public static IsNumeric ( Type type ) : bool
type System.Type The type to be examined.
리턴 bool

MakeGenericType() 공개 정적인 메소드

Creates an instance of a generic Type using the supplied Type arguments
public static MakeGenericType ( Type type, Type typeArgs ) : Type
type System.Type The generic type to be specialized.
typeArgs System.Type The type args.
리턴 System.Type