With() 공개 메소드

public With ( Action generatorConfigurer ) : SpanConstructor
generatorConfigurer Action
리턴 SpanConstructor
예제 #1
0
 public static SpanConstructor Accepts(
     this SpanConstructor self,
     AcceptedCharacters accepted
     )
 {
     return(self.With(eh => eh.AcceptedCharacters = accepted));
 }
예제 #2
0
 public static SpanConstructor AutoCompleteWith(this SpanConstructor self, string autoCompleteString, bool atEndOfSpan)
 {
     return(self.With(new AutoCompleteEditHandler(SpanConstructor.TestTokenizer)
     {
         AutoCompleteString = autoCompleteString, AutoCompleteAtEndOfSpan = atEndOfSpan
     }));
 }
예제 #3
0
        protected virtual Block ConfigureAndAddSpanToBlock(BlockBuilder block, SpanConstructor span)
        {
            switch (block.Type)
            {
            case BlockType.Markup:
                span.With(new MarkupCodeGenerator());
                break;

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

            case BlockType.Expression:
                block.CodeGenerator = new ExpressionCodeGenerator();
                span.With(new ExpressionCodeGenerator());
                break;
            }
            block.Children.Add(span);
            return(block.Build());
        }
예제 #4
0
 public SpanConstructor AsStatement()
 {
     return(_self.With(new StatementCodeGenerator()));
 }
예제 #5
0
 public static SpanConstructor WithEditorHints(this SpanConstructor self, EditorHints hints)
 {
     return(self.With(eh => eh.EditorHints = hints));
 }
 protected virtual Block ConfigureAndAddSpanToBlock(BlockBuilder block, SpanConstructor span)
 {
     switch (block.Type)
     {
         case BlockType.Markup:
             span.With(new MarkupCodeGenerator());
             break;
         case BlockType.Statement:
             span.With(new StatementCodeGenerator());
             break;
         case BlockType.Expression:
             block.CodeGenerator = new ExpressionCodeGenerator();
             span.With(new ExpressionCodeGenerator());
             break;
     }
     block.Children.Add(span);
     return block.Build();
 }