Ejemplo n.º 1
0
        public static SyntaxToken TextLiteral(string value, bool escapeQuotes)
        {
            string encoded = new XText(value).ToString();

            if (escapeQuotes)
            {
                encoded = encoded.Replace("\"", """);
            }

            return(SyntaxFactory.XmlTextLiteral(
                       SyntaxFactory.TriviaList(),
                       encoded,
                       value,
                       SyntaxFactory.TriviaList()));
        }