Skip to content

Commit

Permalink
Merge pull request #78 from TRUMPF-IoT/77-update-docs
Browse files Browse the repository at this point in the history
Removed obsolete call to UseServiceHost from docs
  • Loading branch information
berndbr authored Jun 25, 2024
2 parents 1663ee2 + d7c8862 commit 49c0bf9
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions docs/diContainerOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ applicationServices.AddHost(config => {}, null);
applicationServices.AddCdeInfrastructure(cdeConfig => {});

using var applicationServiceProvider = applicationServices.BuildServiceProvider();
applicationServiceProvider.UseServiceHost();
```

This code builds the main DI container by adding the SAF `ServiceHost` and the [C-DEngine](https://github.com/TRUMPF-IoT/C-DEngine) specific infrastructure service implementations. In addition it loads available SAF Plug-ins. While loading the SAF Plug-ins, SAF internally creates one independent DI container for each of them. It registers the infrastructure services added to the main DI container to the independent Plug-in specific DI container. With that the added SAF infrastructure can be used inside the loaded SAF Plug-ins.
Expand All @@ -19,8 +18,6 @@ Additionaly the SAF Service Host calls the Plug-ins `IServiceAssemblyManifest.Re

All services registered to the Plug-in specific DI container are isolated in that container and are therefore not accessible from inside other Plug-ins. Plug-in to Plug-in communication is therefore only possible through the messaging infrastructure service registered in the main DI container.

Afterwards the code snippet above runs the SAF application by calling the `UserServiceHost` extension method.

The following diagram shows the existing DI containers inside a SAF application:

![SAF DI Container Overview](./diagrams/saf-di-container-overview.svg).
Expand Down

0 comments on commit 49c0bf9

Please sign in to comment.