Пример #1
0
        public void ReplaceAspComments_Properly_Reformats_Server_Side_Comments()
        {
            var inputText      = $"{WebFormsCommentStartTag} {NormalExpressionContent} {WebFormsCommentEndTag}";
            var expectedOutput = $"{RazorCommentStartTag} {NormalExpressionContent} {RazorCommentEndTag}";
            var actualOutput   = EmbeddedCodeReplacers.ReplaceAspComments(inputText);

            Assert.AreEqual(expectedOutput, actualOutput);
        }
Пример #2
0
        public static string ConvertEmbeddedCode(string htmlString, string originalFilePath, ViewImportService viewImportService)
        {
            htmlString = EmbeddedCodeReplacers.ReplaceOneWayDataBinds(htmlString);
            htmlString = EmbeddedCodeReplacers.ReplaceRawExprs(htmlString);
            htmlString = EmbeddedCodeReplacers.ReplaceHTMLEncodedExprs(htmlString);
            htmlString = EmbeddedCodeReplacers.ReplaceAspExprs(htmlString);
            htmlString = EmbeddedCodeReplacers.ReplaceAspComments(htmlString);
            htmlString = EmbeddedCodeReplacers.ReplaceEmbeddedCodeBlocks(htmlString);

            return(htmlString);
        }