Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend Builder #216

Open
zpqrtbnk opened this issue Sep 2, 2019 · 6 comments
Open

Extend Builder #216

zpqrtbnk opened this issue Sep 2, 2019 · 6 comments
Assignees
Labels
state/review Done, Being Reviewed type/feature Feature
Milestone

Comments

@zpqrtbnk
Copy link
Collaborator

zpqrtbnk commented Sep 2, 2019

Make it possible to extend the code builder.

@zpqrtbnk zpqrtbnk self-assigned this Sep 2, 2019
@zpqrtbnk zpqrtbnk added state/in-progress Work In Progress type/feature Feature labels Sep 2, 2019
@zpqrtbnk zpqrtbnk added this to the 4.0.0 milestone Sep 2, 2019
@zpqrtbnk
Copy link
Collaborator Author

zpqrtbnk commented Sep 2, 2019

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 zpqrtbnk added state/review Done, Being Reviewed and removed state/in-progress Work In Progress labels Sep 3, 2019
zpqrtbnk pushed a commit that referenced this issue Apr 12, 2020
zpqrtbnk pushed a commit that referenced this issue Apr 12, 2020
@bielu
Copy link
Contributor

bielu commented Aug 1, 2020

@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);

@bielu
Copy link
Contributor

bielu commented Aug 3, 2020

Also you introduced that registration
composition.Register<IBuilderFactory, TextBuilderFactory>(Lifetime.Singleton);
shouldn't be it actually register as unique to allow for overrides?

@bielu
Copy link
Contributor

bielu commented Aug 20, 2020

@zpqrtbnk

@zpqrtbnk
Copy link
Collaborator Author

Have pushed a commit. Is it doing all the things we discussed?

@bielu
Copy link
Contributor

bielu commented Aug 22, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state/review Done, Being Reviewed type/feature Feature
Projects
None yet
Development

No branches or pull requests

2 participants