Exemplo n.º 1
0
        public void ReplaceHTMLEncodedExprs_Properly_Reformats_Tag()
        {
            var inputText      = $"{WebFormsHTMLEncodedExpressionStartTag} {NormalExpressionContent} {WebFormsNormalEndTag}";
            var expectedOutput = $"{RazorExplicitBindingStartTag}{NormalExpressionContent}{RazorExplicitBindingEndTag}";
            var actualOutput   = EmbeddedCodeReplacers.ReplaceHTMLEncodedExprs(inputText);

            Assert.AreEqual(expectedOutput, actualOutput);
        }
Exemplo n.º 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);
        }