• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# AcceptedCharacters类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中AcceptedCharacters的典型用法代码示例。如果您正苦于以下问题:C# AcceptedCharacters类的具体用法?C# AcceptedCharacters怎么用?C# AcceptedCharacters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AcceptedCharacters类属于命名空间,在下文中一共展示了AcceptedCharacters类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Accepts

 public SpanConstructor Accepts(AcceptedCharacters accepted)
 {
     return With(eh => eh.AcceptedCharacters = accepted);
 }
开发者ID:AndersBillLinden,项目名称:Mvc,代码行数:4,代码来源:SpanConstructor.cs


示例2: EscapedMarkupTagBlock

 public Block EscapedMarkupTagBlock(string prefix, string suffix, AcceptedCharacters acceptedCharacters)
 {
     return new MarkupTagBlock(
         _factory.Markup(prefix),
         _factory.BangEscape(),
         _factory.Markup(suffix).Accepts(acceptedCharacters));
 }
开发者ID:billwaddyjr,项目名称:Razor,代码行数:7,代码来源:BlockFactory.cs


示例3: RunSingleAtEscapeTest

 public static void RunSingleAtEscapeTest(Action<string, Block> testMethod, AcceptedCharacters lastSpanAcceptedCharacters = AcceptedCharacters.None) {
     testMethod("<foo>@@bar</foo>",
                 new MarkupBlock(
                     new MarkupSpan("<foo>"),
                     new MarkupSpan("@", hidden: true),
                     new MarkupSpan("@bar</foo>", hidden: false, acceptedCharacters: lastSpanAcceptedCharacters)
                 )
               );
 }
开发者ID:adrianvallejo,项目名称:MVC3_Source,代码行数:9,代码来源:HtmlParserTestUtils.cs


示例4: RunSingleAtEscapeTest

 public static void RunSingleAtEscapeTest(Action<string, Block> testMethod, AcceptedCharacters lastSpanAcceptedCharacters = AcceptedCharacters.None)
 {
     var factory = SpanFactory.CreateCsHtml();
     testMethod("<foo>@@bar</foo>",
         new MarkupBlock(
             factory.Markup("<foo>"),
             factory.Markup("@").Hidden(),
             factory.Markup("@bar</foo>").Accepts(lastSpanAcceptedCharacters)));
 }
开发者ID:KennyBu,项目名称:Razor,代码行数:9,代码来源:HtmlParserTestUtils.cs


示例5: ImplicitExpressionTest

 protected void ImplicitExpressionTest(string input, string expected, AcceptedCharacters acceptedCharacters, params RazorError[] errors) {
     ParseBlockTest(input,
                    new ExpressionBlock(
                       new ImplicitExpressionSpan(expected, 
                                                  CSharpCodeParser.DefaultKeywords, 
                                                  acceptTrailingDot: false,
                                                  acceptedCharacters: acceptedCharacters)),
                    errors);
 }
开发者ID:jesshaw,项目名称:ASP.NET-Mvc-3,代码行数:9,代码来源:CodeParserTestBase.cs


示例6: ImplicitExpressionTest

 protected void ImplicitExpressionTest(string input, string expected, AcceptedCharacters acceptedCharacters, params RazorError[] errors)
 {
     var factory = CreateSpanFactory();
     ParseBlockTest(SyntaxConstants.TransitionString + input,
                    new ExpressionBlock(
                        factory.CodeTransition(),
                        factory.Code(expected)
                            .AsImplicitExpression(KeywordSet)
                            .Accepts(acceptedCharacters)),
                    errors);
 }
开发者ID:cjqian,项目名称:Razor,代码行数:11,代码来源:CodeParserTestBase.cs


示例7: ParseBlockMethodParsesNullConditionalOperatorImplicitExpression_Bracket

 public void ParseBlockMethodParsesNullConditionalOperatorImplicitExpression_Bracket(
     string implicitExpresison,
     string expectedImplicitExpression,
     AcceptedCharacters acceptedCharacters,
     RazorError[] expectedErrors)
 {
     // Act & Assert
     ImplicitExpressionTest(
         implicitExpresison,
         expectedImplicitExpression,
         acceptedCharacters,
         expectedErrors);
 }
开发者ID:rohitpoudel,项目名称:Razor,代码行数:13,代码来源:CSharpImplicitExpressionTest.cs


示例8: RunMultiAtEscapeTest

 public static void RunMultiAtEscapeTest(Action<string, Block> testMethod, AcceptedCharacters lastSpanAcceptedCharacters = AcceptedCharacters.None) {
     testMethod("<foo>@@@@@bar</foo>", 
                 new MarkupBlock(
                     new MarkupSpan("<foo>"),
                     new MarkupSpan("@", hidden: true),
                     new MarkupSpan("@"),
                     new MarkupSpan("@", hidden: true),
                     new MarkupSpan("@"),
                     new ExpressionBlock(
                         new TransitionSpan(RazorParser.TransitionString, hidden: false, acceptedCharacters: AcceptedCharacters.None),
                         new ImplicitExpressionSpan("bar", CSharpCodeParser.DefaultKeywords, acceptTrailingDot: false, acceptedCharacters: AcceptedCharacters.NonWhiteSpace)
                     ),
                     new MarkupSpan("</foo>", hidden: false, acceptedCharacters: lastSpanAcceptedCharacters)
                 ));
 }
开发者ID:adrianvallejo,项目名称:MVC3_Source,代码行数:15,代码来源:HtmlParserTestUtils.cs


示例9: SimpleMarkupSwitch

 public void SimpleMarkupSwitch(string keyword, string endSequence, AcceptedCharacters acceptedCharacters)
 {
     ParseBlockTest(keyword + Environment.NewLine
                  + "    If True Then" + Environment.NewLine
                  + "        @<p>It's True!</p>" + Environment.NewLine
                  + "    End If" + Environment.NewLine
                  + endSequence,
         new StatementBlock(
             Factory.Code(keyword + "\r\n    If True Then\r\n").AsStatement(),
             new MarkupBlock(
                 Factory.Markup("        "),
                 Factory.MarkupTransition(),
                 Factory.Markup("<p>It's True!</p>\r\n").Accepts(AcceptedCharacters.None)),
             Factory.Code("    End If\r\n" + endSequence).AsStatement().Accepts(acceptedCharacters)));
 }
开发者ID:huangw-t,项目名称:aspnetwebstack,代码行数:15,代码来源:VBToMarkupSwitchTest.cs


示例10: RunMultiAtEscapeTest

 public static void RunMultiAtEscapeTest(Action<string, Block> testMethod, AcceptedCharacters lastSpanAcceptedCharacters = AcceptedCharacters.None)
 {
     var factory = SpanFactory.CreateCsHtml();
     testMethod("<foo>@@@@@bar</foo>",
         new MarkupBlock(
             factory.Markup("<foo>"),
             factory.Markup("@").Hidden(),
             factory.Markup("@"),
             factory.Markup("@").Hidden(),
             factory.Markup("@"),
             new ExpressionBlock(
                 factory.CodeTransition(),
                 factory.Code("bar")
                        .AsImplicitExpression(CSharpCodeParser.DefaultKeywords)
                        .Accepts(AcceptedCharacters.NonWhiteSpace)),
             factory.Markup("</foo>").Accepts(lastSpanAcceptedCharacters)));
 }
开发者ID:KennyBu,项目名称:Razor,代码行数:17,代码来源:HtmlParserTestUtils.cs


示例11: EscapedMarkupTagBlock

        public Block EscapedMarkupTagBlock(
            string prefix,
            string suffix,
            AcceptedCharacters acceptedCharacters,
            params SyntaxTreeNode[] children)
        {
            var newChildren = new List<SyntaxTreeNode>(
                new SyntaxTreeNode[]
                {
                    _factory.Markup(prefix),
                    _factory.BangEscape(),
                    _factory.Markup(suffix).Accepts(acceptedCharacters)
                });

            newChildren.AddRange(children);

            return new MarkupTagBlock(newChildren.ToArray());
        }
开发者ID:huoxudong125,项目名称:Razor,代码行数:18,代码来源:BlockFactory.cs


示例12: SingleLineMarkupSwitch

 public void SingleLineMarkupSwitch(string keyword, string endSequence, AcceptedCharacters acceptedCharacters)
 {
     ParseBlockTest(keyword + Environment.NewLine
                  + "    If True Then" + Environment.NewLine
                  + "        @:<p>It's True!</p>" + Environment.NewLine
                  + "        This is code!" + Environment.NewLine
                  + "    End If" + Environment.NewLine
                  + endSequence,
         new StatementBlock(
             Factory.Code(keyword + "\r\n    If True Then\r\n").AsStatement(),
             new MarkupBlock(
                 Factory.Markup("        "),
                 Factory.MarkupTransition(),
                 Factory.MetaMarkup(":", HtmlSymbolType.Colon),
                 Factory.Markup("<p>It's True!</p>\r\n")
                         .With(new SingleLineMarkupEditHandler(CSharpLanguageCharacteristics.Instance.TokenizeString))
                         .Accepts(AcceptedCharacters.None)),
             Factory.Code("        This is code!\r\n    End If\r\n" + endSequence)
                     .AsStatement()
                     .Accepts(acceptedCharacters)));
 }
开发者ID:huangw-t,项目名称:aspnetwebstack,代码行数:21,代码来源:VBToMarkupSwitchTest.cs


示例13: SingleLineMarkupEditHandler

 public SingleLineMarkupEditHandler(Func<string, IEnumerable<ISymbol>> tokenizer, AcceptedCharacters accepted)
     : base(tokenizer, accepted)
 {
 }
开发者ID:modulexcite,项目名称:Transformalize,代码行数:4,代码来源:SingleLineMarkupEditHandler.cs


示例14: Create

 public static ImplicitExpressionSpan Create(ParserContext context, ISet<string> keywords, bool acceptTrailingDot, AcceptedCharacters acceptedCharacters) {
     return new ImplicitExpressionSpan(context.CurrentSpanStart, context.ContentBuffer.ToString(), keywords, acceptTrailingDot, acceptedCharacters);
 }
开发者ID:adrianvallejo,项目名称:MVC3_Source,代码行数:3,代码来源:ImplicitExpressionSpan.cs


示例15: CommentSpan

 public CommentSpan(SourceLocation start, string content, bool hidden, AcceptedCharacters acceptedCharacters) : base(SpanKind.Comment, start, content, hidden, acceptedCharacters) { }
开发者ID:adrianvallejo,项目名称:MVC3_Source,代码行数:1,代码来源:CommentSpan.cs


示例16: AutoCompleteEditHandler

 public AutoCompleteEditHandler(Func<string, IEnumerable<ISymbol>> tokenizer, AcceptedCharacters accepted)
     : base(tokenizer, accepted)
 {
 }
开发者ID:rohitpoudel,项目名称:Razor,代码行数:4,代码来源:AutoCompleteEditHandler.cs


示例17: ImplicitExpressionSpan

 internal ImplicitExpressionSpan(string content, ISet<string> keywords, bool acceptTrailingDot, AcceptedCharacters acceptedCharacters)
     : base(content) {
     Keywords = keywords ?? new HashSet<string>();
     AcceptTrailingDot = acceptTrailingDot;
     AcceptedCharacters = acceptedCharacters;
 }
开发者ID:adrianvallejo,项目名称:MVC3_Source,代码行数:6,代码来源:ImplicitExpressionSpan.cs


示例18: SingleSpanBlockTest

 protected virtual void SingleSpanBlockTest(string document, string spanContent, BlockType blockType, SpanKind spanType, AcceptedCharacters acceptedCharacters = AcceptedCharacters.Any)
 {
     SingleSpanBlockTest(document, spanContent, blockType, spanType, acceptedCharacters, expectedErrors: null);
 }
开发者ID:x-strong,项目名称:Razor,代码行数:4,代码来源:ParserTestBase.cs


示例19: Accepts

 public static SpanConstructor Accepts(this SpanConstructor self, AcceptedCharacters accepted)
 {
     return self.With(eh => eh.AcceptedCharacters = accepted);
 }
开发者ID:haoduotnt,项目名称:aspnetwebstack,代码行数:4,代码来源:TestSpanBuilder.cs


示例20: CreateSimpleBlockAndSpan

 protected virtual Block CreateSimpleBlockAndSpan(string spanContent, BlockType blockType, SpanKind spanType, AcceptedCharacters acceptedCharacters = AcceptedCharacters.Any)
 {
     var span = Factory.Span(spanType, spanContent, spanType == SpanKind.Markup).Accepts(acceptedCharacters);
     var b = new BlockBuilder()
     {
         Type = blockType
     };
     return ConfigureAndAddSpanToBlock(b, span);
 }
开发者ID:x-strong,项目名称:Razor,代码行数:9,代码来源:ParserTestBase.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AccessCondition类代码示例发布时间:2022-05-24
下一篇:
C# Accelerometer类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap