コード例 #1
0
        private static string[] GetMemberNames <T, TProperty>(this T instance, params Expression <Func <T, TProperty> >[] expressions)
        {
            List <string> memberNames = new List <string>();

            foreach (var cExpression in expressions)
            {
                memberNames.Add(ExpressionExts.GetMemberName(cExpression.Body));
            }

            return(memberNames.ToArray());
        }
コード例 #2
0
 private static string GetMemberName <T, TProperty>(this T instance, Expression <Func <T, TProperty> > expression)
 {
     return(ExpressionExts.GetMemberName(expression.Body));
 }
コード例 #3
0
 private static string GetMemberName <T>(this T instance, Expression <Action <T> > expression)
 {
     return(ExpressionExts.GetMemberName(expression.Body));
 }