public static (string BodyString, IReadOnlyCollection <(string Name, object Value)> BodyValues) GetDiagnosticMessage(Expression body) { var vistor = new DebugValueExpressionVisitor(); vistor.VisitDiagnosticRoot(body); return(vistor.ToString(), vistor.DebugValues); }
public static (string BodyString, IReadOnlyCollection <(string Name, object Value)> BodyValues) BodyToString(Expression body) { /* * TODO Cleanups * * AutoWebService URL, method, (headers, body?) * Single boolean member-access expressions append an `== true`? * ToString for ValueTuples * Pretty-printing values for LINQ .First, .Single, .Select, etc. * */ var vistor = new DebugValueExpressionVisitor(); vistor.Visit(body); return(vistor.ToString(), vistor.DebugValues); }