C# Class Rock.Utility.ExpressionHelper

Expresssion Helper Methods
显示文件 Open project: NewSpring/Rock

Public Methods

Method Description
ConvertValueToPropertyType ( string value, Type propertyType, bool isNullableType ) : object

Converts the type of the value to property.

GetAttributeExpression ( IService serviceInstance, System.Linq.Expressions.ParameterExpression parameterExpression, EntityField entityField, List values ) : Expression

Builds an expression for an attribute field

PropertyFilterExpression ( List filterValues, Expression parameterExpression, string propertyName, Type propertyType ) : Expression

Gets a filter expression for an entity property value.

Method Details

ConvertValueToPropertyType() public static method

Converts the type of the value to property.
public static ConvertValueToPropertyType ( string value, Type propertyType, bool isNullableType ) : object
value string The value.
propertyType System.Type Type of the property.
isNullableType bool if set to true [is nullable type].
return object

GetAttributeExpression() public static method

Builds an expression for an attribute field
public static GetAttributeExpression ( IService serviceInstance, System.Linq.Expressions.ParameterExpression parameterExpression, EntityField entityField, List values ) : Expression
serviceInstance IService The service instance.
parameterExpression System.Linq.Expressions.ParameterExpression The parameter expression.
entityField Rock.Reporting.EntityField The property.
values List The values.
return System.Linq.Expressions.Expression

PropertyFilterExpression() public static method

Gets a filter expression for an entity property value.
public static PropertyFilterExpression ( List filterValues, Expression parameterExpression, string propertyName, Type propertyType ) : Expression
filterValues List The filter values.
parameterExpression System.Linq.Expressions.Expression The parameter expression.
propertyName string Name of the property.
propertyType System.Type Type of the property.
return System.Linq.Expressions.Expression