C# 클래스 System.Dynamic.Utils.TypeUtils

파일 보기 프로젝트 열기: dotnet/corefx

Private Properties

프로퍼티 타입 설명
FindConversionOperator System.Reflection.MethodInfo
IsContravariant bool
IsCovariant bool
IsDelegate bool
IsFloatingPoint bool
IsImplicitBoxingConversion bool
IsImplicitNullableConversion bool
IsImplicitNumericConversion bool
IsImplicitReferenceConversion bool
IsInvariant bool
IsUnsigned bool

공개 메소드들

메소드 설명
AreEquivalent ( Type t1, Type t2 ) : bool
AreReferenceAssignable ( Type dest, Type src ) : bool
CanCache ( this t ) : bool

We can cache references to types, as long as they aren't in collectible assemblies. Unfortunately, we can't really distinguish between different flavors of assemblies. But, we can at least create a cache for types in mscorlib (so we get the primitives, etc).

FindGenericType ( Type definition, Type type ) : Type
GetBooleanOperator ( Type type, string name ) : MethodInfo

Searches for an operator method on the type. The method must have the specified signature, no generic arguments, and have the SpecialName bit set. Also searches inherited operator methods. NOTE: This was designed to satisfy the needs of op_True and op_False, because we have to do runtime lookup for those. It may not work right for unary operators in general.

GetNonNullableType ( this type ) : Type
GetNonRefType ( this type ) : Type
GetNullableType ( this type ) : Type
GetUserDefinedCoercionMethod ( Type convertFrom, Type convertToType ) : MethodInfo
HasBuiltInEqualityOperator ( Type left, Type right ) : bool
HasIdentityPrimitiveOrNullableConversionTo ( this source, Type dest ) : bool
HasReferenceConversionTo ( this source, Type dest ) : bool
HasReferenceEquality ( Type left, Type right ) : bool
IsArithmetic ( this type ) : bool
IsBool ( this type ) : bool
IsConvertible ( this type ) : bool
IsImplicitlyConvertibleTo ( this source, Type destination ) : bool
IsInteger ( this type ) : bool
IsInteger64 ( this type ) : bool
IsIntegerOrBool ( this type ) : bool
IsLegalExplicitVariantDelegateConversion ( Type source, Type dest ) : bool
IsNullableOrReferenceType ( this type ) : bool
IsNullableType ( this type ) : bool
IsNumeric ( this type ) : bool
IsNumericOrBool ( this type ) : bool
IsSameOrSubclass ( Type type, Type subType ) : bool
IsUnsignedInt ( this type ) : bool
IsValidInstanceType ( MemberInfo member, Type instanceType ) : bool
IsVector ( this type ) : bool
ValidateType ( Type type, string paramName ) : void
ValidateType ( Type type, string paramName, int index ) : void

비공개 메소드들

메소드 설명
FindConversionOperator ( MethodInfo methods, Type typeFrom, Type typeTo ) : MethodInfo
IsContravariant ( Type t ) : bool
IsCovariant ( Type t ) : bool
IsDelegate ( Type t ) : bool
IsFloatingPoint ( this type ) : bool
IsImplicitBoxingConversion ( Type source, Type destination ) : bool
IsImplicitNullableConversion ( Type source, Type destination ) : bool
IsImplicitNumericConversion ( Type source, Type destination ) : bool
IsImplicitReferenceConversion ( Type source, Type destination ) : bool
IsInvariant ( Type t ) : bool
IsUnsigned ( this type ) : bool

메소드 상세

AreEquivalent() 공개 정적인 메소드

public static AreEquivalent ( Type t1, Type t2 ) : bool
t1 Type
t2 Type
리턴 bool

AreReferenceAssignable() 공개 정적인 메소드

public static AreReferenceAssignable ( Type dest, Type src ) : bool
dest Type
src Type
리턴 bool

CanCache() 공개 정적인 메소드

We can cache references to types, as long as they aren't in collectible assemblies. Unfortunately, we can't really distinguish between different flavors of assemblies. But, we can at least create a cache for types in mscorlib (so we get the primitives, etc).
public static CanCache ( this t ) : bool
t this
리턴 bool

FindGenericType() 공개 정적인 메소드

public static FindGenericType ( Type definition, Type type ) : Type
definition Type
type Type
리턴 Type

GetBooleanOperator() 공개 정적인 메소드

Searches for an operator method on the type. The method must have the specified signature, no generic arguments, and have the SpecialName bit set. Also searches inherited operator methods. NOTE: This was designed to satisfy the needs of op_True and op_False, because we have to do runtime lookup for those. It may not work right for unary operators in general.
public static GetBooleanOperator ( Type type, string name ) : MethodInfo
type Type
name string
리턴 System.Reflection.MethodInfo

GetNonNullableType() 공개 정적인 메소드

public static GetNonNullableType ( this type ) : Type
type this
리턴 Type

GetNonRefType() 공개 정적인 메소드

public static GetNonRefType ( this type ) : Type
type this
리턴 Type

GetNullableType() 공개 정적인 메소드

public static GetNullableType ( this type ) : Type
type this
리턴 Type

GetUserDefinedCoercionMethod() 공개 정적인 메소드

public static GetUserDefinedCoercionMethod ( Type convertFrom, Type convertToType ) : MethodInfo
convertFrom Type
convertToType Type
리턴 System.Reflection.MethodInfo

HasBuiltInEqualityOperator() 공개 정적인 메소드

public static HasBuiltInEqualityOperator ( Type left, Type right ) : bool
left Type
right Type
리턴 bool

HasIdentityPrimitiveOrNullableConversionTo() 공개 정적인 메소드

public static HasIdentityPrimitiveOrNullableConversionTo ( this source, Type dest ) : bool
source this
dest Type
리턴 bool

HasReferenceConversionTo() 공개 정적인 메소드

public static HasReferenceConversionTo ( this source, Type dest ) : bool
source this
dest Type
리턴 bool

HasReferenceEquality() 공개 정적인 메소드

public static HasReferenceEquality ( Type left, Type right ) : bool
left Type
right Type
리턴 bool

IsArithmetic() 공개 정적인 메소드

public static IsArithmetic ( this type ) : bool
type this
리턴 bool

IsBool() 공개 정적인 메소드

public static IsBool ( this type ) : bool
type this
리턴 bool

IsConvertible() 공개 정적인 메소드

public static IsConvertible ( this type ) : bool
type this
리턴 bool

IsImplicitlyConvertibleTo() 공개 정적인 메소드

public static IsImplicitlyConvertibleTo ( this source, Type destination ) : bool
source this
destination Type
리턴 bool

IsInteger() 공개 정적인 메소드

public static IsInteger ( this type ) : bool
type this
리턴 bool

IsInteger64() 공개 정적인 메소드

public static IsInteger64 ( this type ) : bool
type this
리턴 bool

IsIntegerOrBool() 공개 정적인 메소드

public static IsIntegerOrBool ( this type ) : bool
type this
리턴 bool

IsLegalExplicitVariantDelegateConversion() 공개 정적인 메소드

public static IsLegalExplicitVariantDelegateConversion ( Type source, Type dest ) : bool
source Type
dest Type
리턴 bool

IsNullableOrReferenceType() 공개 정적인 메소드

public static IsNullableOrReferenceType ( this type ) : bool
type this
리턴 bool

IsNullableType() 공개 정적인 메소드

public static IsNullableType ( this type ) : bool
type this
리턴 bool

IsNumeric() 공개 정적인 메소드

public static IsNumeric ( this type ) : bool
type this
리턴 bool

IsNumericOrBool() 공개 정적인 메소드

public static IsNumericOrBool ( this type ) : bool
type this
리턴 bool

IsSameOrSubclass() 공개 정적인 메소드

public static IsSameOrSubclass ( Type type, Type subType ) : bool
type Type
subType Type
리턴 bool

IsUnsignedInt() 공개 정적인 메소드

public static IsUnsignedInt ( this type ) : bool
type this
리턴 bool

IsValidInstanceType() 공개 정적인 메소드

public static IsValidInstanceType ( MemberInfo member, Type instanceType ) : bool
member System.Reflection.MemberInfo
instanceType Type
리턴 bool

IsVector() 공개 정적인 메소드

public static IsVector ( this type ) : bool
type this
리턴 bool

ValidateType() 공개 정적인 메소드

public static ValidateType ( Type type, string paramName ) : void
type Type
paramName string
리턴 void

ValidateType() 공개 정적인 메소드

public static ValidateType ( Type type, string paramName, int index ) : void
type Type
paramName string
index int
리턴 void