C# 클래스 FullInspector.Internal.fiTypeExtensions

Extensions to the Type API.
파일 보기 프로젝트 열기: jacobdufault/fullinspector

공개 메소드들

메소드 설명
GetInterface ( this type, Type interfaceType ) : Type

Searches for a particular implementation of the given interface type inside of the type. This is particularly useful if the interface type is an open type, ie, typeof(IFace{}), because this method will then return IFace{} but with appropriate type parameters inserted.

HasParent ( this type, Type parentType ) : bool

Searches for a particular implementation of the given type inside of the type. This is particularly useful if the interface type is an open type, ie, typeof(IFace{}), because this method will then return IFace{} but with appropriate type parameters inserted.

IsImplementationOf ( this type, Type interfaceType ) : bool

Returns true if the baseType is an implementation of the given interface type. The interface type can be generic.

IsNullableType ( this type ) : bool

Returns true if the given type is nullable.

This *should* always return false if the type was fetched via GetType() according to the .NET docs at http://msdn.microsoft.com/en-us/library/ms366789.aspx.

비공개 메소드들

메소드 설명
CompareTypes ( Type a, Type b ) : bool

메소드 상세

GetInterface() 공개 정적인 메소드

Searches for a particular implementation of the given interface type inside of the type. This is particularly useful if the interface type is an open type, ie, typeof(IFace{}), because this method will then return IFace{} but with appropriate type parameters inserted.
public static GetInterface ( this type, Type interfaceType ) : Type
type this The base type to search for interface
interfaceType System.Type /// The interface type to search for. Can be an open generic type. ///
리턴 System.Type

HasParent() 공개 정적인 메소드

Searches for a particular implementation of the given type inside of the type. This is particularly useful if the interface type is an open type, ie, typeof(IFace{}), because this method will then return IFace{} but with appropriate type parameters inserted.
public static HasParent ( this type, Type parentType ) : bool
type this The base type to search for interface
parentType System.Type /// The interface type to search for. Can be an open generic type. ///
리턴 bool

IsImplementationOf() 공개 정적인 메소드

Returns true if the baseType is an implementation of the given interface type. The interface type can be generic.
public static IsImplementationOf ( this type, Type interfaceType ) : bool
type this /// The type to search for an implementation of the given interface ///
interfaceType System.Type The interface type to search for
리턴 bool

IsNullableType() 공개 정적인 메소드

Returns true if the given type is nullable.
This *should* always return false if the type was fetched via GetType() according to the .NET docs at http://msdn.microsoft.com/en-us/library/ms366789.aspx.
public static IsNullableType ( this type ) : bool
type this
리턴 bool