C# Class Catel.Reflection.TypeInfoExtensions

The type info extensions.
Show file Open project: Catel/Catel

Public Methods

Method Description
GetConstructor ( this typeInfo, Type types, BindingFlags bindingFlags ) : ConstructorInfo

Gets the constructor with the specified types.

GetConstructors ( this typeInfo, BindingFlags bindingFlags ) : System.Reflection.ConstructorInfo[]

Gets the constructors.

GetEvent ( this typeInfo, string name, BindingFlags bindingFlags ) : EventInfo

Gets the event with the specified name.

GetEvents ( this typeInfo, BindingFlags bindingFlags ) : System.Reflection.EventInfo[]

Gets the events.

GetField ( this typeInfo, string name, BindingFlags bindingFlags ) : FieldInfo

Gets the field with the specified name.

GetFields ( this typeInfo, BindingFlags bindingFlags ) : System.Reflection.FieldInfo[]

Gets the fields.

GetMember ( this typeInfo, string name, BindingFlags bindingFlags ) : System.Reflection.MemberInfo[]

Gets the member with the specified name.

GetMembers ( this typeInfo, BindingFlags bindingFlags ) : System.Reflection.MemberInfo[]

Gets the members.

GetMethod ( this typeInfo, string name, BindingFlags bindingFlags ) : MethodInfo

Gets the method with the specified name.

GetMethod ( this typeInfo, string name, Type types, BindingFlags bindingFlags ) : MethodInfo

Gets the method with the specified name and types.

GetMethods ( this typeInfo, BindingFlags bindingFlags ) : System.Reflection.MethodInfo[]

Gets the methods.

GetProperties ( this typeInfo, BindingFlags bindingFlags ) : System.Reflection.PropertyInfo[]

Gets the properties.

GetProperty ( this typeInfo, string name, BindingFlags bindingFlags ) : PropertyInfo

Gets the property with the specified name.

Private Methods

Method Description
ShouldFlattenHierarchy ( BindingFlags bindingFlags ) : bool

Determines whether the hierarchy should be flattened based on the specified binding flags.

Method Details

GetConstructor() public static method

Gets the constructor with the specified types.
The is null.
public static GetConstructor ( this typeInfo, Type types, BindingFlags bindingFlags ) : ConstructorInfo
typeInfo this The .
types System.Type The types of the constructor.
bindingFlags BindingFlags The binding flags.
return System.Reflection.ConstructorInfo

GetConstructors() public static method

Gets the constructors.
The is null.
public static GetConstructors ( this typeInfo, BindingFlags bindingFlags ) : System.Reflection.ConstructorInfo[]
typeInfo this The .
bindingFlags BindingFlags The binding flags.
return System.Reflection.ConstructorInfo[]

GetEvent() public static method

Gets the event with the specified name.
The is null. The is null or whitespace.
public static GetEvent ( this typeInfo, string name, BindingFlags bindingFlags ) : EventInfo
typeInfo this The .
name string The name of the member to retrieve.
bindingFlags BindingFlags The binding flags.
return System.Reflection.EventInfo

GetEvents() public static method

Gets the events.
The is null.
public static GetEvents ( this typeInfo, BindingFlags bindingFlags ) : System.Reflection.EventInfo[]
typeInfo this The .
bindingFlags BindingFlags The binding flags.
return System.Reflection.EventInfo[]

GetField() public static method

Gets the field with the specified name.
The is null. The is null or whitespace.
public static GetField ( this typeInfo, string name, BindingFlags bindingFlags ) : FieldInfo
typeInfo this The .
name string The name of the member to retrieve.
bindingFlags BindingFlags The binding flags.
return System.Reflection.FieldInfo

GetFields() public static method

Gets the fields.
The is null.
public static GetFields ( this typeInfo, BindingFlags bindingFlags ) : System.Reflection.FieldInfo[]
typeInfo this The .
bindingFlags BindingFlags The binding flags.
return System.Reflection.FieldInfo[]

GetMember() public static method

Gets the member with the specified name.
The is null. The is null or whitespace.
public static GetMember ( this typeInfo, string name, BindingFlags bindingFlags ) : System.Reflection.MemberInfo[]
typeInfo this The .
name string The name of the member to retrieve.
bindingFlags BindingFlags The binding flags.
return System.Reflection.MemberInfo[]

GetMembers() public static method

Gets the members.
The is null.
public static GetMembers ( this typeInfo, BindingFlags bindingFlags ) : System.Reflection.MemberInfo[]
typeInfo this The .
bindingFlags BindingFlags The binding flags.
return System.Reflection.MemberInfo[]

GetMethod() public static method

Gets the method with the specified name.
The is null. The is null or whitespace.
public static GetMethod ( this typeInfo, string name, BindingFlags bindingFlags ) : MethodInfo
typeInfo this The .
name string The name of the member to retrieve.
bindingFlags BindingFlags The binding flags.
return System.Reflection.MethodInfo

GetMethod() public static method

Gets the method with the specified name and types.
The is null. The is null or whitespace.
public static GetMethod ( this typeInfo, string name, Type types, BindingFlags bindingFlags ) : MethodInfo
typeInfo this The .
name string The name of the member to retrieve.
types System.Type The types of the method.
bindingFlags BindingFlags The binding flags.
return System.Reflection.MethodInfo

GetMethods() public static method

Gets the methods.
The is null.
public static GetMethods ( this typeInfo, BindingFlags bindingFlags ) : System.Reflection.MethodInfo[]
typeInfo this The .
bindingFlags BindingFlags The binding flags.
return System.Reflection.MethodInfo[]

GetProperties() public static method

Gets the properties.
The is null.
public static GetProperties ( this typeInfo, BindingFlags bindingFlags ) : System.Reflection.PropertyInfo[]
typeInfo this The .
bindingFlags BindingFlags The binding flags.
return System.Reflection.PropertyInfo[]

GetProperty() public static method

Gets the property with the specified name.
The is null. The is null or whitespace.
public static GetProperty ( this typeInfo, string name, BindingFlags bindingFlags ) : PropertyInfo
typeInfo this The .
name string The name of the member to retrieve.
bindingFlags BindingFlags The binding flags.
return System.Reflection.PropertyInfo