Skip to main content

ExpressionUtils

Assembly: ServiceStack.Common.dll
View Source
Declaration
public static class ExpressionUtils

Methods

ToPropertyInfo(Expression)

View Source
Declaration
public static PropertyInfo ToPropertyInfo(this Expression fieldExpr)
Returns

System.Reflection.PropertyInfo

Parameters
TypeName
System.Linq.Expressions.ExpressionfieldExpr

ToPropertyInfo(LambdaExpression)

View Source
Declaration
public static PropertyInfo ToPropertyInfo(LambdaExpression lambda)
Returns

System.Reflection.PropertyInfo

Parameters
TypeName
System.Linq.Expressions.LambdaExpressionlambda

ToPropertyInfo(MemberExpression)

View Source
Declaration
public static PropertyInfo ToPropertyInfo(MemberExpression m)
Returns

System.Reflection.PropertyInfo

Parameters
TypeName
System.Linq.Expressions.MemberExpressionm

GetMemberName<T>(Expression<Func<T, Object>>)

View Source
Declaration
public static string GetMemberName<T>(Expression<Func<T, object>> fieldExpr)
Returns

System.String

Parameters
TypeName
System.Linq.Expressions.Expression<System.Func<<T>,System.Object>>fieldExpr
Type Parameters
  • T

GetMemberExpression<T>(Expression<Func<T, Object>>)

View Source
Declaration
public static MemberExpression GetMemberExpression<T>(Expression<Func<T, object>> expr)
Returns

System.Linq.Expressions.MemberExpression

Parameters
TypeName
System.Linq.Expressions.Expression<System.Func<<T>,System.Object>>expr
Type Parameters
  • T

AssignedValues<T>(Expression<Func<T>>)

View Source
Declaration
public static Dictionary<string, object> AssignedValues<T>(this Expression<Func<T>> expr)
Returns

System.Collections.Generic.Dictionary<System.String,System.Object>

Parameters
TypeName
System.Linq.Expressions.Expression<System.Func<<T>>>expr
Type Parameters
  • T

GetFieldNames<T>(Expression<Func<T, Object>>)

View Source
Declaration
public static string[] GetFieldNames<T>(this Expression<Func<T, object>> expr)
Returns

System.String[]

Parameters
TypeName
System.Linq.Expressions.Expression<System.Func<<T>,System.Object>>expr
Type Parameters
  • T

GetValue(MemberBinding)

View Source
Declaration
public static object GetValue(this MemberBinding binding)
Returns

System.Object

Parameters
TypeName
System.Linq.Expressions.MemberBindingbinding