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

[Feature] View and viewmodel auto-registration #4

Open
BurkusCat opened this issue Oct 2, 2023 · 0 comments
Open

[Feature] View and viewmodel auto-registration #4

BurkusCat opened this issue Oct 2, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@BurkusCat
Copy link
Owner

Is your feature request related to a problem? Please describe.
Based on the naming/folder structure, automatically register dependencies

Describe the solution you'd like
If I have a view called HomePage and a viewmodel called HomeViewModel (or HomePageViewModel) then both of these dependencies should be automatically registered).

There should be a default schema/configuration for registering dependencies named in a certain way as transient dependencies (should services be auto-registered as singletons?). It should be possible to provide a configuration the BurkusMvvmBuilder to provide custom naming rules and overrides for dependency registration.

Auto-registration should be opt-in as it could lead to unexpected behaviour if enabled by default. Should reflection be used? Is it possible to use source generators for this?

Describe alternatives you've considered
Manual registration of dependencies.

Proposed APIs
If possible, try to propose how the API might look. For example:

// BurkusMvvmBuilder
.AutoRegisterDependencies();

.AutoRegisterDependencies(configuration??);

Additional context
N/A

@BurkusCat BurkusCat added the enhancement New feature or request label Oct 2, 2023
@BurkusCat BurkusCat added the help wanted Extra attention is needed label Oct 14, 2023
@BurkusCat BurkusCat pinned this issue Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant