From d6dfd748bb6d018ccb7c1a26f2a0515ca521d0cd Mon Sep 17 00:00:00 2001 From: Caran <142813963+carl-andersson-at-westermo@users.noreply.github.com> Date: Thu, 7 Mar 2024 15:35:08 +0100 Subject: [PATCH] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a506f12..fbeff74 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,10 @@ For an example regarding which projects are best server by which package, see th ```mermaid graph TD; - App[Main()]-->Dependency A[ClassLib]; - App[Main()]-->Dependency B[ClassLib]; - Dependency B[ClassLib]-->Dependency C[ClassLib]; - Dependency A[ClassLib]-->Dependency C[ClassLib]; + App-->Dependency A; + App-->Dependency B; + Dependency B-->Dependency C; + Dependency A-->Dependency C; ``` In the above graph, the reccomended action would be to add a reference to **FactoryGenerator.Attributes** to _Dependency C_ as that will in turn allow _Dependency A_ and _Dependency B_ to reference @@ -56,4 +56,4 @@ the attributes therein. Additionally, a reference to **FactoryGenerator** is bes Overriding Injections, i.e if in the graph above _Dependency C_ injected an ```ISomething``` instance and that specific implementation of ```ISomething``` will not work for anything that uses _Dependency B_, then _Dependency B_ can substitute that injection by providing it's own injection of ```ISomething```. This overriding generally follows the project dependency tree, so if _Project A_ depends on _Project B_ which depends on _Project C_, A can override both B and C, but B cannot override A. **Note** -Overriding Injections will not work if you resolve an ```IEnumerable```, as that will net your a collection of all ```ISomething``` that have been injected. \ No newline at end of file +Overriding Injections will not work if you resolve an ```IEnumerable```, as that will net your a collection of all ```ISomething``` that have been injected.