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
Type | Name |
---|---|
System.Linq.Expressions.Expression | fieldExpr |
ToPropertyInfo(LambdaExpression)
View Source
Declaration
public static PropertyInfo ToPropertyInfo(LambdaExpression lambda)
Returns
System.Reflection.PropertyInfo
Parameters
Type | Name |
---|---|
System.Linq.Expressions.LambdaExpression | lambda |
ToPropertyInfo(MemberExpression)
View Source
Declaration
public static PropertyInfo ToPropertyInfo(MemberExpression m)
Returns
System.Reflection.PropertyInfo
Parameters
Type | Name |
---|---|
System.Linq.Expressions.MemberExpression | m |
GetMemberName<T>(Expression<Func<T, Object>>)
View Source
Declaration
public static string GetMemberName<T>(Expression<Func<T, object>> fieldExpr)
Returns
System.String
Parameters
Type | Name |
---|---|
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
Type | Name |
---|---|
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
Type | Name |
---|---|
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
Type | Name |
---|---|
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
Type | Name |
---|---|
System.Linq.Expressions.MemberBinding | binding |