C# Class Selenol.Extensions.ReflectionExtensions

The extensions for reflection types.
ファイルを表示 Open project: pbakshy/Selenol

Public Methods

Method Description
GetProperty ( this rootType, MethodInfo methodInfo ) : PropertyInfo

Gets property info from specified type by getter or setter method info.

IsAssignableFromGenericType ( this currentType, Type givenType ) : bool

Determines whether an instance of the current Type can be assigned from an instance of the specified Type.

IsAutoProperty ( this propertyInfo ) : bool

Checks whether the property is auto property.

IsGetter ( this methodInfo ) : bool

Checks whether the method info is property getter.

IsPropertyWithSelectorAttribute ( this propertyInfo ) : bool

Checks whether the property specified with BaseSelectorAttribute.

IsSetter ( this methodInfo ) : bool

Checks whether the method info is property setter.

Method Details

GetProperty() public static method

Gets property info from specified type by getter or setter method info.
public static GetProperty ( this rootType, MethodInfo methodInfo ) : PropertyInfo
rootType this The root type.
methodInfo System.Reflection.MethodInfo The getter of setter method Info.
return System.Reflection.PropertyInfo

IsAssignableFromGenericType() public static method

Determines whether an instance of the current Type can be assigned from an instance of the specified Type.
public static IsAssignableFromGenericType ( this currentType, Type givenType ) : bool
currentType this The current type.
givenType System.Type The type to compare with the current type.
return bool

IsAutoProperty() public static method

Checks whether the property is auto property.
public static IsAutoProperty ( this propertyInfo ) : bool
propertyInfo this The property info.
return bool

IsGetter() public static method

Checks whether the method info is property getter.
public static IsGetter ( this methodInfo ) : bool
methodInfo this The method info.
return bool

IsPropertyWithSelectorAttribute() public static method

Checks whether the property specified with BaseSelectorAttribute.
public static IsPropertyWithSelectorAttribute ( this propertyInfo ) : bool
propertyInfo this The property info.
return bool

IsSetter() public static method

Checks whether the method info is property setter.
public static IsSetter ( this methodInfo ) : bool
methodInfo this The method info.
return bool