Show / Hide Table of Contents

Class FastReflectionHelper

A reflection strategy that uses either traditional reflection or compiled lambda expressions to get property values from an object.

Inheritance
System.Object
FastReflectionHelper
Namespace: IgniteUI.Blazor.Controls
Assembly: IgniteUI.Blazor.dll
Syntax
public class FastReflectionHelper : Object

Constructors

FastReflectionHelper()

Constructs the fast reflection helper.

Declaration
public FastReflectionHelper()

FastReflectionHelper(Boolean, String)

Constructs the fast reflection helper.

Declaration
public FastReflectionHelper(bool useTraditionalReflection, string propertyName)
Parameters
Type Name Description
System.Boolean useTraditionalReflection

Should the helper use traditional (slower) reflection.

System.String propertyName

The propertyname this will be reflecting on.

Properties

Invalid

Returns true if the fast reflection helper is invalid, probably due to a lack of a property name.

Declaration
public bool Invalid { get; }
Property Value
Type Description
System.Boolean

PropertyName

Gets or sets the property name of the current FastReflectionHelper object.

Declaration
public string PropertyName { get; set; }
Property Value
Type Description
System.String

UseTraditionalReflection

Indicates that current FastReflectionHelper object is not using compiled expressions.

Declaration
public bool UseTraditionalReflection { get; set; }
Property Value
Type Description
System.Boolean

Methods

GetPropertyValue(Object)

Gets the property value from the specified item.

Declaration
public object GetPropertyValue(object item)
Parameters
Type Name Description
System.Object item
Returns
Type Description
System.Object

Property value or null if the property value cannot be determined.

GetPropertyValue(Type, Object)

Gets the property value for the specified item.

Declaration
public object GetPropertyValue(Type itemType, object item)
Parameters
Type Name Description
System.Type itemType

The item type.

System.Object item

The item containing the property.

Returns
Type Description
System.Object

Property value or null if the property value cannot be determined.

SetPropertyValue(Object, Object)

Sets the property value for the specified item.

Declaration
public void SetPropertyValue(object item, object value)
Parameters
Type Name Description
System.Object item

The item to set the property on.

System.Object value

The value to update the property with.