C# Класс FullInspector.Internal.fiTypeExtensions

Extensions to the Type API.
Показать файл Открыть проект

Открытые методы

Метод Описание
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