C# Class SpecExpress.Util.TypeExtensions

显示文件 Open project: rbell/SpecExpress

Public Methods

Method Description
AllInterfaces ( this type ) : IEnumerable
CanBeCastTo ( this pluggedType, Type pluginType ) : bool

Determines if the pluggedType can be upcast to the pluginType

Closes ( this type, Type openType ) : bool
FindFirstInterfaceThatCloses ( this pluggedType, Type templateType ) : Type
FindInterfacesThatClose ( this pluggedType, Type templateType ) : IEnumerable
GenericCanBeCast ( Type pluginType, Type pluggedType ) : bool
GetFullName ( this type ) : string
GetInnerTypeFromNullable ( this nullableType ) : Type
GetName ( this type ) : string
ImplementsInterfaceTemplate ( this pluggedType, Type templateType ) : bool
IsAutoFillable ( this type ) : bool
IsChild ( this type ) : bool
IsChildArray ( this type ) : bool
IsConcrete ( this type ) : bool
IsConcreteAndAssignableTo ( this pluggedType, Type pluginType ) : bool
IsInNamespace ( this type, string nameSpace ) : bool
IsNullable ( this type ) : bool
IsOpenGeneric ( this type ) : bool
IsPrimitive ( this type ) : bool
IsPrimitiveArray ( this type ) : bool
IsSimple ( this type ) : bool
IsString ( this type ) : bool

Private Methods

Method Description
checkGenericType ( Type pluggedType, Type pluginType ) : bool

Method Details

AllInterfaces() public static method

public static AllInterfaces ( this type ) : IEnumerable
type this
return IEnumerable

CanBeCastTo() public static method

Determines if the pluggedType can be upcast to the pluginType
public static CanBeCastTo ( this pluggedType, Type pluginType ) : bool
pluggedType this
pluginType System.Type
return bool

Closes() public static method

public static Closes ( this type, Type openType ) : bool
type this
openType System.Type
return bool

FindFirstInterfaceThatCloses() public static method

public static FindFirstInterfaceThatCloses ( this pluggedType, Type templateType ) : Type
pluggedType this
templateType System.Type
return System.Type

FindInterfacesThatClose() public static method

public static FindInterfacesThatClose ( this pluggedType, Type templateType ) : IEnumerable
pluggedType this
templateType System.Type
return IEnumerable

GenericCanBeCast() public static method

public static GenericCanBeCast ( Type pluginType, Type pluggedType ) : bool
pluginType System.Type
pluggedType System.Type
return bool

GetFullName() public static method

public static GetFullName ( this type ) : string
type this
return string

GetInnerTypeFromNullable() public static method

public static GetInnerTypeFromNullable ( this nullableType ) : Type
nullableType this
return System.Type

GetName() public static method

public static GetName ( this type ) : string
type this
return string

ImplementsInterfaceTemplate() public static method

public static ImplementsInterfaceTemplate ( this pluggedType, Type templateType ) : bool
pluggedType this
templateType System.Type
return bool

IsAutoFillable() public static method

public static IsAutoFillable ( this type ) : bool
type this
return bool

IsChild() public static method

public static IsChild ( this type ) : bool
type this
return bool

IsChildArray() public static method

public static IsChildArray ( this type ) : bool
type this
return bool

IsConcrete() public static method

public static IsConcrete ( this type ) : bool
type this
return bool

IsConcreteAndAssignableTo() public static method

public static IsConcreteAndAssignableTo ( this pluggedType, Type pluginType ) : bool
pluggedType this
pluginType System.Type
return bool

IsInNamespace() public static method

public static IsInNamespace ( this type, string nameSpace ) : bool
type this
nameSpace string
return bool

IsNullable() public static method

public static IsNullable ( this type ) : bool
type this
return bool

IsOpenGeneric() public static method

public static IsOpenGeneric ( this type ) : bool
type this
return bool

IsPrimitive() public static method

public static IsPrimitive ( this type ) : bool
type this
return bool

IsPrimitiveArray() public static method

public static IsPrimitiveArray ( this type ) : bool
type this
return bool

IsSimple() public static method

public static IsSimple ( this type ) : bool
type this
return bool

IsString() public static method

public static IsString ( this type ) : bool
type this
return bool