Esempio n. 1
0
 public override CodeBuilder DecorateCodeBuilder(CodeBuilder incomingBuilder, CodeBuilderContext context)
 {
     if (incomingBuilder is CodeGenTestCodeBuilder)
     {
         return incomingBuilder;
     }
     else
     {
         return new CodeGenTestCodeBuilder(context);
     }
 }
 public override CodeBuilder DecorateCodeBuilder(CodeBuilder incomingBuilder, CodeBuilderContext context)
 {
     return new AttributeCodeGeneratorReplacingCodeBuilder(context);
 }
Esempio n. 3
0
 public override CodeBuilder DecorateCodeBuilder(CodeBuilder incomingBuilder, CodeGeneratorContext context)
 {
     UpdateCodeBuilder(context);
     return new MvcCSharpCodeBuilder(context, _hostOptions);
 }
Esempio n. 4
0
 /// <summary>
 /// Gets an instance of the code builder and is provided an opportunity to decorate or replace it
 /// </summary>
 /// <param name="incomingBuilder">The code builder</param>
 /// <returns>Either the same code builder, after modifications, or a different code builder.</returns>
 public virtual CodeBuilder DecorateCodeBuilder(CodeBuilder incomingBuilder, CodeBuilderContext context)
 {
     if (incomingBuilder == null)
     {
         throw new ArgumentNullException("incomingBuilder");
     }
     return incomingBuilder;
 }
Esempio n. 5
0
            public override CodeBuilder DecorateCodeBuilder(CodeBuilder incomingBuilder, CodeBuilderContext context)
            {
                base.DecorateCodeBuilder(incomingBuilder, context);

                return new TestCSharpCodeBuilder(context,
                                                 DefaultModel,
                                                 ActivateAttribute,
                                                 new GeneratedTagHelperAttributeContext
                                                 {
                                                     ModelExpressionTypeName = ModelExpressionType,
                                                     CreateModelExpressionMethodName = CreateModelExpressionMethod
                                                 });
            }