C# Класс ReflectionExtensions

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
GetCustomAttributes ( this type, Type attributeType, bool inherit ) : object[]
GetCustomAttributes ( this type, bool inherit ) : object[]
GetEvent ( this type, string eventName ) : EventInfo
GetField ( this type, string fieldName ) : FieldInfo
GetFields ( this type ) : IEnumerable
GetFields ( this type, BindingFlags, flags ) : IEnumerable
GetMethod ( this type, string methodName ) : MethodInfo
GetMethod ( this type, string methodName, BindingFlags, flags ) : MethodInfo
GetMethod ( this type, string methodName, BindingFlags, bindingAttr, Object binder, Type parameters, Object modifiers ) : MethodInfo
GetMethod ( this type, string methodName, Type parameters ) : MethodInfo
GetMethods ( this type ) : IEnumerable
GetMethods ( this type, BindingFlags, flags ) : IEnumerable
GetProperties ( this type, BindingFlags, flags ) : IEnumerable
GetProperty ( this type, string propertyName ) : PropertyInfo
GetProperty ( this type, string propertyName, BindingFlags, flags ) : PropertyInfo
GetProperty ( this type, string propertyName, Type returnType ) : PropertyInfo
GetTypes ( this assembly ) : IEnumerable
IsAssignableFrom ( this type, Type c ) : bool
IsAssignableFrom ( this type, TypeInfo typeInfo ) : bool
IsEnum ( this type ) : bool
IsSubclassOf ( this type, Type c ) : bool

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

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

public static GetCustomAttributes ( this type, Type attributeType, bool inherit ) : object[]
type this
attributeType Type
inherit bool
Результат object[]

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

public static GetCustomAttributes ( this type, bool inherit ) : object[]
type this
inherit bool
Результат object[]

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

public static GetEvent ( this type, string eventName ) : EventInfo
type this
eventName string
Результат EventInfo

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

public static GetField ( this type, string fieldName ) : FieldInfo
type this
fieldName string
Результат FieldInfo

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

public static GetFields ( this type ) : IEnumerable
type this
Результат IEnumerable

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

public static GetFields ( this type, BindingFlags, flags ) : IEnumerable
type this
flags BindingFlags,
Результат IEnumerable

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

public static GetMethod ( this type, string methodName ) : MethodInfo
type this
methodName string
Результат MethodInfo

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

public static GetMethod ( this type, string methodName, BindingFlags, flags ) : MethodInfo
type this
methodName string
flags BindingFlags,
Результат MethodInfo

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

public static GetMethod ( this type, string methodName, BindingFlags, bindingAttr, Object binder, Type parameters, Object modifiers ) : MethodInfo
type this
methodName string
bindingAttr BindingFlags,
binder Object
parameters Type
modifiers Object
Результат MethodInfo

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

public static GetMethod ( this type, string methodName, Type parameters ) : MethodInfo
type this
methodName string
parameters Type
Результат MethodInfo

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

public static GetMethods ( this type ) : IEnumerable
type this
Результат IEnumerable

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

public static GetMethods ( this type, BindingFlags, flags ) : IEnumerable
type this
flags BindingFlags,
Результат IEnumerable

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

public static GetProperties ( this type, BindingFlags, flags ) : IEnumerable
type this
flags BindingFlags,
Результат IEnumerable

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

public static GetProperty ( this type, string propertyName ) : PropertyInfo
type this
propertyName string
Результат PropertyInfo

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

public static GetProperty ( this type, string propertyName, BindingFlags, flags ) : PropertyInfo
type this
propertyName string
flags BindingFlags,
Результат PropertyInfo

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

public static GetProperty ( this type, string propertyName, Type returnType ) : PropertyInfo
type this
propertyName string
returnType Type
Результат PropertyInfo

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

public static GetTypes ( this assembly ) : IEnumerable
assembly this
Результат IEnumerable

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

public static IsAssignableFrom ( this type, Type c ) : bool
type this
c Type
Результат bool

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

public static IsAssignableFrom ( this type, TypeInfo typeInfo ) : bool
type this
typeInfo TypeInfo
Результат bool

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

public static IsEnum ( this type ) : bool
type this
Результат bool

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

public static IsSubclassOf ( this type, Type c ) : bool
type this
c Type
Результат bool