当前位置: 首页>>代码示例>>C#>>正文


C# Parser.ProcessTokenList方法代码示例

本文整理汇总了C#中Parser.ProcessTokenList方法的典型用法代码示例。如果您正苦于以下问题:C# Parser.ProcessTokenList方法的具体用法?C# Parser.ProcessTokenList怎么用?C# Parser.ProcessTokenList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Parser的用法示例。


在下文中一共展示了Parser.ProcessTokenList方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ManyArguments

        public void ManyArguments()
        {
            var template = "oi $bundleCss.Add(/oi.css).AddMini(teste.css).Add(jiban.css)$ tchau";
            var parser = new Parser(Scanner.ParseString(template), new TestEngine());

            Assert.AreEqual(@"oi {""Content"":null,""Name"":""bundleCss"",""IsActive"":false,""ElementStatus"":0,""Arguments"":[{""Key"":""Add"",""Value"":""jiban.css""},{""Key"":""AddMini"",""Value"":""teste.css""},{""Key"":""Add"",""Value"":""/oi.css""}]} tchau", parser.ProcessTokenList());
        }
开发者ID:lstern,项目名称:practices,代码行数:7,代码来源:TemplateEngineTests.cs

示例2: NestedCommand

        public void NestedCommand()
        {
            var template = "oi $jiraya($manabu(ServerName)$)$ tchau";
            var parser = new Parser(Scanner.ParseString(template), new TestEngine());

            Assert.AreEqual(@"oi {""Content"":null,""Name"":""jiraya"",""IsActive"":false,""ElementStatus"":0,""Arguments"":[{""Key"":""{\""Content\"":null,\""Name\"":\""manabu\"",\""IsActive\"":false,\""ElementStatus\"":0,\""Arguments\"":[{\""Key\"":\""ServerName\"",\""Value\"":null}]}"",""Value"":null}]} tchau", parser.ProcessTokenList());
        }
开发者ID:lstern,项目名称:practices,代码行数:7,代码来源:TemplateEngineTests.cs

示例3: NumberInsideTag

        public void NumberInsideTag()
        {
            var template = "<mto:upper>Computador R$ 3000</mto:upper>";

            var parser = new Parser(Scanner.ParseString(template), new TestEngine());

            Assert.AreEqual(@"COMPUTADOR R$ 3000", parser.ProcessTokenList());
        }
开发者ID:lstern,项目名称:practices,代码行数:8,代码来源:TemplateEngineTests.cs

示例4: NestedTag

        public void NestedTag()
        {
            var template = "<mto:reverse>uahct <mto:reverse>Bom dia</mto:reverse> io</mto:reverse>";

            var parser = new Parser(Scanner.ParseString(template), new TestEngine());

            Assert.AreEqual(@"oi Bom dia tchau", parser.ProcessTokenList());
        }
开发者ID:lstern,项目名称:practices,代码行数:8,代码来源:TemplateEngineTests.cs

示例5: JqueryInsideTag

        public void JqueryInsideTag()
        {
            var template = "<mto:upper>$('.classe')</mto:upper>.show();";

            var parser = new Parser(Scanner.ParseString(template), new TestEngine());

            Assert.AreEqual(@"$('.CLASSE').show();", parser.ProcessTokenList());
        }
开发者ID:lstern,项目名称:practices,代码行数:8,代码来源:TemplateEngineTests.cs

示例6: OneTag

        public void OneTag()
        {
            var template = "oi <mto:jaspion argumento=\"oi\" /> tchau";

            var parser = new Parser(Scanner.ParseString(template), new TestEngine());

            Assert.AreEqual(@"oi {""Content"":null,""Name"":""jaspion"",""IsActive"":true,""ElementStatus"":0,""Arguments"":[{""Key"":""argumento"",""Value"":""oi""}]} tchau", parser.ProcessTokenList());
        }
开发者ID:lstern,项目名称:practices,代码行数:8,代码来源:TemplateEngineTests.cs

示例7: TagWithContent

        public void TagWithContent()
        {
            var template = "oi <mto:teste> bom dia </mto:teste> tchau";

            var parser = new Parser(Scanner.ParseString(template), new TestEngine());

            Assert.AreEqual(@"oi {""Content"":null,""Name"":""teste"",""IsActive"":true,""ElementStatus"":0,""Arguments"":[]} bom dia  tchau", parser.ProcessTokenList());
        }
开发者ID:lstern,项目名称:practices,代码行数:8,代码来源:TemplateEngineTests.cs

示例8: TagWithCommandInContent

        public void TagWithCommandInContent()
        {
            var template = "oi <mto:reverse> $bom(dia)$ </mto:reverse> tchau";

            var parser = new Parser(Scanner.ParseString(template), new TestEngine());

            Assert.AreEqual(@"oi  }]}llun:""eulaV"",""aid"":""yeK""{[:""stnemugrA"",0:""sutatStnemelE"",eslaf:""evitcAsI"",""mob"":""emaN"",llun:""tnetnoC""{  tchau", parser.ProcessTokenList());
        }
开发者ID:lstern,项目名称:practices,代码行数:8,代码来源:TemplateEngineTests.cs

示例9: TagSkip

        public void TagSkip()
        {
            var template = "oi <mto:skip>erro</mto:skip> tchau";

            var parser = new Parser(Scanner.ParseString(template), new TestEngine());

            Assert.AreEqual(@"oi  tchau", parser.ProcessTokenList());
        }
开发者ID:lstern,项目名称:practices,代码行数:8,代码来源:TemplateEngineTests.cs

示例10: TagDump

        public void TagDump()
        {
            var template = "oi <mto:dump><mto:upper>erro</mto:upper> bom dia</mto:dump> tchau";

            var parser = new Parser(Scanner.ParseString(template), new TestEngine());

            Assert.AreEqual(@"oi <mto:upper>erro</mto:upper> bom dia tchau", parser.ProcessTokenList());
        }
开发者ID:lstern,项目名称:practices,代码行数:8,代码来源:TemplateEngineTests.cs

示例11: TagContent

        public void TagContent()
        {
            var template = "oi <mto:reverse>Bom dia</mto:reverse> tchau";

            var parser = new Parser(Scanner.ParseString(template), new TestEngine());

            Assert.AreEqual(@"oi aid moB tchau", parser.ProcessTokenList());
        }
开发者ID:lstern,项目名称:practices,代码行数:8,代码来源:TemplateEngineTests.cs

示例12: SimpleTemplate

        public void SimpleTemplate()
        {
            var template = "oi mundo";
            var parser = new Parser(Scanner.ParseString(template), new TestEngine());

            Assert.AreEqual(template, parser.ProcessTokenList());
        }
开发者ID:lstern,项目名称:practices,代码行数:7,代码来源:TemplateEngineTests.cs


注:本文中的Parser.ProcessTokenList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。