C# Класс RiotNet.ReflectionUtils

Contains reflection-related helper methods.
Показать файл Открыть проект

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

Метод Описание
GetDictionaryInterface ( Type type ) : Type

Gets the IDictionary<,> interface that the type implements, if any.

GetGenericInterface ( Type type, Type genericInterfaceDefinition ) : Type

Gets the interface that a type implements that matches the specified generic interface definition.

GetListInterface ( Type type ) : Type

Gets the IList<> interface that the type implements, if any.

IsSubclassOfGenericTypeDefinition ( Type objectType, Type genericTypeDefinition ) : bool

Gets whether the specified type is a subclass of a generic type represented by the specified generic type definition.

Описание методов

GetDictionaryInterface() публичный статический Метод

Gets the IDictionary<,> interface that the type implements, if any.
public static GetDictionaryInterface ( Type type ) : Type
type System.Type The type of object that implements the interface.
Результат System.Type

GetGenericInterface() публичный статический Метод

Gets the interface that a type implements that matches the specified generic interface definition.
public static GetGenericInterface ( Type type, Type genericInterfaceDefinition ) : Type
type System.Type The type of object that implements the interface.
genericInterfaceDefinition System.Type A generic type definition for an interface (e.g. typeof(IEnumerable<>)).
Результат System.Type

GetListInterface() публичный статический Метод

Gets the IList<> interface that the type implements, if any.
public static GetListInterface ( Type type ) : Type
type System.Type The type of object that implements the interface.
Результат System.Type

IsSubclassOfGenericTypeDefinition() публичный статический Метод

Gets whether the specified type is a subclass of a generic type represented by the specified generic type definition.
public static IsSubclassOfGenericTypeDefinition ( Type objectType, Type genericTypeDefinition ) : bool
objectType System.Type The type to check.
genericTypeDefinition System.Type A generic type definition (e.g. typeof(List<>))
Результат bool