internal static string Serialize(RazorSyntaxTree syntaxTree)
        {
            using (var writer = new StringWriter())
            {
                var visitor = new ClassifiedSpanWriter(writer, syntaxTree);
                visitor.Visit();

                return(writer.ToString());
            }
        }
Esempio n. 2
0
        internal static string Serialize(SyntaxTreeNode node, string filePath = null)
        {
            using (var writer = new StringWriter())
            {
                var visitor = new ClassifiedSpanWriter(writer, filePath);
                visitor.Visit(node);

                return(writer.ToString());
            }
        }