Esempio n. 1
0
        public static string Print(this TypeSyntax typeSyntax)
        {
            using var writer = new StringWriter();
            var printer = new SyntaxPrinter(new SyntaxWriter(writer));

            printer.Visit(typeSyntax);
            printer.Dispose();

            return(writer.ToString());
        }
Esempio n. 2
0
 /// <summary>
 /// Returns the GraphQL syntax representation of this <see cref="ISyntaxNode"/>.
 /// </summary>
 /// <param name="indented">
 /// A value that indicates whether the GraphQL output should be formatted,
 /// which includes indenting nested GraphQL tokens, adding
 /// new lines, and adding white space between property names and values.
 /// </param>
 /// <returns>
 /// Returns the GraphQL syntax representation of this <see cref="ISyntaxNode"/>.
 /// </returns>
 public string ToString(bool indented) => SyntaxPrinter.Print(this, indented);
Esempio n. 3
0
 /// <summary>
 /// Returns the GraphQL syntax representation of this <see cref="ISyntaxNode"/>.
 /// </summary>
 /// <returns>
 /// Returns the GraphQL syntax representation of this <see cref="ISyntaxNode"/>.
 /// </returns>
 public override string ToString() => SyntaxPrinter.Print(this, true);