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()); }
/// <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);
/// <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);