當前位置: 首頁>>代碼示例>>C#>>正文


C# AcceptedCharacters類代碼示例

本文整理匯總了C#中AcceptedCharacters的典型用法代碼示例。如果您正苦於以下問題:C# AcceptedCharacters類的具體用法?C# AcceptedCharacters怎麽用?C# AcceptedCharacters使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AcceptedCharacters類屬於命名空間,在下文中一共展示了AcceptedCharacters類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的AcceptedCharacters類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。