Open zpqrtbnk opened 5 years ago
Idea: the builder is an IBuilder
that is provided by an IBuilderFactory
- ppl can register their own factory to supply their own builder, which can be from scratch or inherit from the built-in builder - and customize the generated code.
Experimenting...
@zpqrtbnk if we are creating that in that way, shouldn't we actually also change registrations of CodeFactory to Unique or Collection as to override ICodeModelBuilder we need to override Code factory as part of code of CF is:
public virtual ICodeModelBuilder CreateCodeModelBuilder(ModelsBuilderOptions options, CodeOptions codeOptions) => new CodeModelBuilder(options, codeOptions);
Also you introduced that registration
composition.Register<IBuilderFactory, TextBuilderFactory>(Lifetime.Singleton);
shouldn't be it actually register as unique to allow for overrides?
@zpqrtbnk
Have pushed a commit. Is it doing all the things we discussed?
HI Stephan, looks like you covered all things which we discussed. :) and I think we can move that ticket to ready as it allows already really well for extensions
Make it possible to extend the code builder.