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

IoC container extensions #503

Open
TimofeyBurak opened this issue Nov 14, 2022 · 1 comment
Open

IoC container extensions #503

TimofeyBurak opened this issue Nov 14, 2022 · 1 comment
Labels
c/wl Related to WhiteLabel component. enhancement New feature or request

Comments

@TimofeyBurak
Copy link
Contributor

Detailed Description

Currently, IContainerBuilder interface is our primary abstraction of an IoC container builder. It is used to register different parts of the XToolkit, including WhiteLabel itself. Currently, IContainerBuilder is a part of WhiteLabel project, and thus can be used only within WhileLabel project (WhiteLabel is registered as a part of Bootstrapper class). This means that all other projects don't know anything about the container they will be registered in, so it is developer's responsibilities to register all required parts in specific way manually in the production solution.

Context

#500 has an example of complex push-notification services initialisation, which cannot be simplified with current approach. Also, it shows that currently WhiteLabel controls IoC container creation, even though it can be created (and filled) independently

Possible Implementation

If we move IContainerBuilder interface into XToolkit.Common project (or, alternatively, migrate into using Microsoft.Extensions.DependencyInjection) - it will allow each project implement a shortcuts for IoC container registrations. Even WhiteLabel initialisation can be implemented as an extension, thus further decoupling WhiteLabel with Bootstrapping and removing any interferences with 3-d party integrations

Basic Information

  • Component which need this feature: PushNotifications, Remote, WhiteLabel
  • Version which need this feature: 8af5c6a
@TimofeyBurak TimofeyBurak added the enhancement New feature or request label Nov 14, 2022
@TimofeyBurak
Copy link
Contributor Author

Kudos to @vadimpylsky for the idea

@wcoder wcoder added the c/wl Related to WhiteLabel component. label Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/wl Related to WhiteLabel component. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants