A reflection strategy that uses either traditional reflection or compiled lambda expressions to get property values from an object.
Inheritance
object
Constructors
Section titled "Constructors"constructor
public FastReflectionHelper() Returns FastReflectionHelper
constructor
public FastReflectionHelper(bool useTraditionalReflection, string propertyName) Returns FastReflectionHelper
Properties
Section titled "Properties"Invalid
Section titled "Invalid"Returns true if the fast reflection helper is invalid, probably due to a lack of a property name.
public bool Invalid { get; } PropertyName
Section titled "PropertyName"Gets or sets the property name of the current FastReflectionHelper object.
public string PropertyName { get; set; } UseTraditionalReflection
Section titled "UseTraditionalReflection"Indicates that current FastReflectionHelper object is not using compiled expressions.
public bool UseTraditionalReflection { get; set; } Methods
Section titled "Methods"GetPropertyValue(object)
Section titled "GetPropertyValue(object)"Gets the property value from the specified item.
public object GetPropertyValue(object item) Parameters
- item:
object
Returns any
GetPropertyValue(Type, object)
Section titled "GetPropertyValue(Type, object)"Gets the property value for the specified item.
public object GetPropertyValue(Type itemType, object item) Parameters
- itemType:
Type - item:
object
Returns any
SetPropertyValue(object, object)
Section titled "SetPropertyValue(object, object)"Sets the property value for the specified item.
public void SetPropertyValue(object item, object value) Parameters
- item:
object - value:
object