コード例 #1
0
 public static SpanConstructor AutoCompleteWith(
     this SpanConstructor self,
     string autoCompleteString,
     bool atEndOfSpan)
 {
     return(self.With(new AutoCompleteEditHandler(
                          SpanConstructor.TestTokenizer,
                          autoCompleteAtEndOfSpan: atEndOfSpan)
     {
         AutoCompleteString = autoCompleteString
     }));
 }
コード例 #2
0
ファイル: ParserTestBase.cs プロジェクト: lodejard/AllNetCore
        protected virtual Block ConfigureAndAddSpanToBlock(BlockBuilder block, SpanConstructor span)
        {
            switch (block.Type)
            {
            case BlockType.Markup:
                span.With(new MarkupChunkGenerator());
                break;

            case BlockType.Statement:
                span.With(new StatementChunkGenerator());
                break;

            case BlockType.Expression:
                block.ChunkGenerator = new ExpressionChunkGenerator();
                span.With(new ExpressionChunkGenerator());
                break;
            }
            block.Children.Add(span);
            return(block.Build());
        }
コード例 #3
0
ファイル: ParserTestBase.cs プロジェクト: x-strong/Razor
 protected virtual Block ConfigureAndAddSpanToBlock(BlockBuilder block, SpanConstructor span)
 {
     switch (block.Type)
     {
         case BlockType.Markup:
             span.With(new MarkupChunkGenerator());
             break;
         case BlockType.Statement:
             span.With(new StatementChunkGenerator());
             break;
         case BlockType.Expression:
             block.ChunkGenerator = new ExpressionChunkGenerator();
             span.With(new ExpressionChunkGenerator());
             break;
     }
     block.Children.Add(span);
     return block.Build();
 }
コード例 #4
0
 public UnclassifiedCodeSpanConstructor(SpanConstructor self)
 {
     _self = self;
 }
コード例 #5
0
 public static SpanConstructor WithEditorHints(this SpanConstructor self, EditorHints hints)
 {
     return(self.With(eh => eh.EditorHints = hints));
 }
コード例 #6
0
 public static SpanConstructor AutoCompleteWith(this SpanConstructor self, string autoCompleteString)
 {
     return(AutoCompleteWith(self, autoCompleteString, atEndOfSpan: false));
 }
コード例 #7
0
 public static SpanConstructor Accepts(this SpanConstructor self, AcceptedCharacters accepted)
 {
     return(self.With(eh => eh.AcceptedCharacters = accepted));
 }
コード例 #8
0
ファイル: TestSpanBuilder.cs プロジェクト: cjqian/Razor
 public UnclassifiedCodeSpanConstructor(SpanConstructor self)
 {
     _self = self;
 }