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

[Discuss] Change of implementation for SubmodelRepositoryServiceProvider #3

Open
bjoernhoeper opened this issue Sep 22, 2022 · 0 comments

Comments

@bjoernhoeper
Copy link

Currently the Creation of Submodels in the SubmodelRepositoryServiceProvider uses an extension method on the Submodel itself to create the Service Provider for that Submodel. But I consider the creation of the Service Provider the task of the SubmodelRepositoryServiceProvider and not one of the submodel.
Furthermore at the moment you could not inject another implementation into the SubmodelRepositoryServiceProvider that would allow a decision about which implementation to use. So the implementation for the service provideer is fixed then.

So my proposal is the following:

  • Change the implemntation so that a Factory for service providers gets injected via DI
  • The service provider is created using the injected factory
  • The default implementation for the factory is the same realisation as currently with the extension method

This way the old behaviour is preserved and the adpatability is enhanced.

@constantinziesche Is there anything that stands against this approach?

bjoernhoeper added a commit to ProSys40/basyx-dotnet-sdk that referenced this issue Oct 15, 2022
Changed the implementation to use submodel service provider for creating
provider for submodels instead of extension method and added tests for that

References eclipse-basyx#3
bjoernhoeper added a commit to ProSys40/basyx-dotnet-sdk that referenced this issue Oct 16, 2022
Changed the implementation of the AAS repository service provider to use
a factory instead of an extension method for service provider creation

References eclipse-basyx#3
bjoernhoeper added a commit to ProSys40/basyx-dotnet-sdk that referenced this issue Oct 16, 2022
Changed the implementation to use submodel service provider for creating
provider for submodels instead of extension method and added tests for that

References eclipse-basyx#3
bjoernhoeper added a commit to ProSys40/basyx-dotnet-sdk that referenced this issue Oct 16, 2022
Changed the implementation of the AAS repository service provider to use
a factory instead of an extension method for service provider creation

References eclipse-basyx#3
bjoernhoeper added a commit to ProSys40/basyx-dotnet-sdk that referenced this issue May 27, 2024
Changed the implementation to use submodel service provider for creating
provider for submodels instead of extension method and added tests for that

References eclipse-basyx#3
bjoernhoeper added a commit to ProSys40/basyx-dotnet-sdk that referenced this issue May 27, 2024
Changed the implementation of the AAS repository service provider to use
a factory instead of an extension method for service provider creation

References eclipse-basyx#3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant