コード例 #1
0
 static string ConcatPath(string path, Expression propertyExpression)
 {
     return(string.Format("{0}{1}{2}",
                          path,
                          string.IsNullOrEmpty(path) ? string.Empty : ".",
                          ExpressionPathVisitor.GetPath(propertyExpression)));
 }
コード例 #2
0
        /// <summary>
        /// Extracts the path for the given expression.
        /// </summary>
        /// <param name="ex">The expression.</param>
        /// <param name="output">The output.</param>
        public static void ExtractPath(this Expression ex, StringBuilder output)
        {
            var visitor = new ExpressionPathVisitor(output);

            visitor.Visit(ex);
        }