C# 클래스 FullInspector.Internal.fiReflectionUtility

파일 보기 프로젝트 열기: jacobdufault/fullinspector

공개 메소드들

메소드 설명
GetCreatableTypesDeriving ( Type baseType ) : List

Returns all types that derive from the base type. This includes generic type definitions, which when returned will have appropriate constructor values injected.

GetExactImplementation ( this type, Type parentType ) : Type

Searches for a particular implementation of the given parent 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.

GetObjectTypeNameSafe ( object obj ) : string

Tries to fetch the given CSharpName of the given object type, or null if the object is null.

GetTypesDeriving ( Type baseType ) : List

비공개 메소드들

메소드 설명
GetIndexOfName ( Type types, string name ) : int

Helper method to return the index of the Type in the array that has the given Name (or - 1 if the item is not in the array).

SelectBestTypeParameters ( List candidateTypes, Type openGenericType ) : System.Type[]

Orders the given types parameter array so that the order most closely matches the given genericArguments array

TryConstructAssignableGenericType ( Type openGenericType, Type baseType, Type baseTypeGenericDefinition, Type baseTypeGenericArguments, Type &constructedType ) : bool

Attempts to create an instance of openGenericType such that it is can be assigned to baseType.

fiReflectionUtility ( ) : System

메소드 상세

GetCreatableTypesDeriving() 공개 정적인 메소드

Returns all types that derive from the base type. This includes generic type definitions, which when returned will have appropriate constructor values injected.
public static GetCreatableTypesDeriving ( Type baseType ) : List
baseType System.Type The base parent type.
리턴 List

GetExactImplementation() 공개 정적인 메소드

Searches for a particular implementation of the given parent 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 GetExactImplementation ( this type, Type parentType ) : Type
type this The base type to search for interface
parentType System.Type /// The parent type to search for. Can be an open generic type. ///
리턴 System.Type

GetObjectTypeNameSafe() 공개 정적인 메소드

Tries to fetch the given CSharpName of the given object type, or null if the object is null.
public static GetObjectTypeNameSafe ( object obj ) : string
obj object
리턴 string

GetTypesDeriving() 공개 정적인 메소드

public static GetTypesDeriving ( Type baseType ) : List
baseType System.Type
리턴 List