Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayPianikov committed Nov 19, 2024
1 parent db32754 commit b6f1c2c
Show file tree
Hide file tree
Showing 93 changed files with 595 additions and 650 deletions.
21 changes: 9 additions & 12 deletions readme/ArrayDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ classDiagram
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
class CompositionRoot {
+CompositionRoot(IService1 service1, IService2 service21, IService2 service22, IService2 service23, IService3 service3, IService4 service41, IService4 service42)
}
Service1 --|> IService1
class Service1 {
+Service1(IService2 service2)
Expand All @@ -28,6 +25,11 @@ classDiagram
class Service3 {
+Service3(IService4 service41, IService4 service42)
}
Service4 --|> IService4
class Service4 {
+Service4()
}
class ArrayᐸIService3ᐳ
Service3v2 --|> IService3 : 2
class Service3v2 {
+Service3v2(IService4 service41, IService4 service42)
Expand All @@ -40,11 +42,6 @@ classDiagram
class Service3v4 {
+Service3v4(IService4 service41, IService4 service42)
}
Service4 --|> IService4
class Service4 {
+Service4()
}
class ArrayᐸIService3ᐳ
class IService1 {
<<interface>>
}
Expand All @@ -57,21 +54,21 @@ classDiagram
class IService4 {
<<interface>>
}
Array ..> CompositionRoot : CompositionRoot TestPureDIByCR()
CompositionRoot *-- Service1 : IService1
CompositionRoot *-- "3 " Service2Array : IService2
CompositionRoot *-- Service3 : IService3
CompositionRoot *-- "2 " Service4 : IService4
Array ..> CompositionRoot : CompositionRoot TestPureDIByCR()
Service1 *-- Service2Array : IService2
Service2Array *-- ArrayᐸIService3ᐳ : ArrayᐸIService3ᐳ
Service3 *-- "2 " Service4 : IService4
Service3v2 *-- "2 " Service4 : IService4
Service3v3 *-- "2 " Service4 : IService4
Service3v4 *-- "2 " Service4 : IService4
ArrayᐸIService3ᐳ *-- Service3 : IService3
ArrayᐸIService3ᐳ *-- Service3v2 : 2 IService3
ArrayᐸIService3ᐳ *-- Service3v3 : 3 IService3
ArrayᐸIService3ᐳ *-- Service3v4 : 4 IService3
Service3v2 *-- "2 " Service4 : IService4
Service3v3 *-- "2 " Service4 : IService4
Service3v4 *-- "2 " Service4 : IService4
```

### Generated code
Expand Down
21 changes: 9 additions & 12 deletions readme/EnumDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ classDiagram
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
class CompositionRoot {
+CompositionRoot(IService1 service1, IService2 service21, IService2 service22, IService2 service23, IService3 service3, IService4 service41, IService4 service42)
}
Service1 --|> IService1
class Service1 {
+Service1(IService2 service2)
Expand All @@ -28,6 +25,11 @@ classDiagram
class Service3 {
+Service3(IService4 service41, IService4 service42)
}
Service4 --|> IService4
class Service4 {
+Service4()
}
class IEnumerableᐸIService3ᐳ
Service3v2 --|> IService3 : 2
class Service3v2 {
+Service3v2(IService4 service41, IService4 service42)
Expand All @@ -40,11 +42,6 @@ classDiagram
class Service3v4 {
+Service3v4(IService4 service41, IService4 service42)
}
Service4 --|> IService4
class Service4 {
+Service4()
}
class IEnumerableᐸIService3ᐳ
class IService1 {
<<interface>>
}
Expand All @@ -57,21 +54,21 @@ classDiagram
class IService4 {
<<interface>>
}
Enum ..> CompositionRoot : CompositionRoot TestPureDIByCR()
CompositionRoot *-- Service1 : IService1
CompositionRoot *-- "3 " Service2Enum : IService2
CompositionRoot *-- Service3 : IService3
CompositionRoot *-- "2 " Service4 : IService4
Enum ..> CompositionRoot : CompositionRoot TestPureDIByCR()
Service1 *-- Service2Enum : IService2
Service2Enum o-- "PerBlock" IEnumerableᐸIService3ᐳ : IEnumerableᐸIService3ᐳ
Service3 *-- "2 " Service4 : IService4
Service3v2 *-- "2 " Service4 : IService4
Service3v3 *-- "2 " Service4 : IService4
Service3v4 *-- "2 " Service4 : IService4
IEnumerableᐸIService3ᐳ *-- Service3 : IService3
IEnumerableᐸIService3ᐳ *-- Service3v2 : 2 IService3
IEnumerableᐸIService3ᐳ *-- Service3v3 : 3 IService3
IEnumerableᐸIService3ᐳ *-- Service3v4 : 4 IService3
Service3v2 *-- "2 " Service4 : IService4
Service3v3 *-- "2 " Service4 : IService4
Service3v4 *-- "2 " Service4 : IService4
```

### Generated code
Expand Down
5 changes: 1 addition & 4 deletions readme/FuncDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ classDiagram
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
class CompositionRoot {
+CompositionRoot(IService1 service1, IService2 service21, IService2 service22, IService2 service23, IService3 service3, IService4 service41, IService4 service42)
}
Service1 --|> IService1
class Service1 {
+Service1(IService2 service2)
Expand Down Expand Up @@ -45,11 +42,11 @@ classDiagram
class IService4 {
<<interface>>
}
Func ..> CompositionRoot : CompositionRoot TestPureDIByCR()
CompositionRoot *-- Service1 : IService1
CompositionRoot *-- "3 " Service2Func : IService2
CompositionRoot *-- Service3 : IService3
CompositionRoot *-- "2 " Service4 : IService4
Func ..> CompositionRoot : CompositionRoot TestPureDIByCR()
Service1 *-- Service2Func : IService2
Service2Func o-- "PerBlock" FuncᐸIService3ᐳ : FuncᐸIService3ᐳ
Service3 *-- "2 " Service4 : IService4
Expand Down
5 changes: 1 addition & 4 deletions readme/SingletonDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ classDiagram
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
class CompositionRoot {
+CompositionRoot(IService1 service1, IService2 service21, IService2 service22, IService2 service23, IService3 service3, IService4 service41, IService4 service42)
}
Service1 --|> IService1
class Service1 {
+Service1(IService2 service2)
Expand Down Expand Up @@ -44,11 +41,11 @@ classDiagram
class IService4 {
<<interface>>
}
Singleton ..> CompositionRoot : CompositionRoot TestPureDIByCR()
CompositionRoot o-- "Scoped" Service1 : IService1
CompositionRoot *-- "3 " Service2 : IService2
CompositionRoot *-- Service3 : IService3
CompositionRoot o-- "2 Scoped" Service4 : IService4
Singleton ..> CompositionRoot : CompositionRoot TestPureDIByCR()
Service1 *-- Service2 : IService2
Service2 *-- "5 " Service3 : IService3
Service3 o-- "2 Scoped" Service4 : IService4
Expand Down
5 changes: 1 addition & 4 deletions readme/TransientDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ classDiagram
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
class CompositionRoot {
+CompositionRoot(IService1 service1, IService2 service21, IService2 service22, IService2 service23, IService3 service3, IService4 service41, IService4 service42)
}
Service1 --|> IService1
class Service1 {
+Service1(IService2 service2)
Expand Down Expand Up @@ -44,11 +41,11 @@ classDiagram
class IService4 {
<<interface>>
}
Transient ..> CompositionRoot : CompositionRoot TestPureDIByCR()
CompositionRoot *-- Service1 : IService1
CompositionRoot *-- "3 " Service2 : IService2
CompositionRoot *-- Service3 : IService3
CompositionRoot *-- "2 " Service4 : IService4
Transient ..> CompositionRoot : CompositionRoot TestPureDIByCR()
Service1 *-- Service2 : IService2
Service2 *-- "5 " Service3 : IService3
Service3 *-- "2 " Service4 : IService4
Expand Down
12 changes: 6 additions & 6 deletions readme/a-few-partial-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,20 +197,20 @@ classDiagram
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
Dependency --|> IDependency
class Dependency {
+Dependency()
}
Service --|> IService
class Service {
+Service(IDependency dependency)
}
class IDependency {
<<interface>>
Dependency --|> IDependency
class Dependency {
+Dependency()
}
class IService {
<<interface>>
}
class IDependency {
<<interface>>
}
Composition ..> Service : IService Root
Service *-- Dependency : IDependency
```
Expand Down
19 changes: 8 additions & 11 deletions readme/accumulators.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,31 +237,28 @@ classDiagram
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
class MyAccumulator
class ValueTupleᐸIServiceˏMyAccumulatorᐳ {
+ValueTuple(IService item1, MyAccumulator item2)
Service --|> IService
class Service {
+Service(IDependency dependency1, IDependency dependency2, IDependency dependency3)
}
AbcDependency --|> IDependency
class MyAccumulator
AbcDependency --|> IDependency : typeof(Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency)
class AbcDependency {
+AbcDependency()
}
XyzDependency --|> IDependency : typeof(Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency)
class XyzDependency {
+XyzDependency()
}
Service --|> IService
class Service {
+Service(IDependency dependency1, IDependency dependency2, IDependency dependency3)
}
class IDependency {
class IService {
<<interface>>
}
class IService {
class IDependency {
<<interface>>
}
Composition ..> ValueTupleᐸIServiceˏMyAccumulatorᐳ : ValueTupleᐸIServiceˏMyAccumulatorᐳ Root
ValueTupleᐸIServiceˏMyAccumulatorᐳ *-- Service : IService
ValueTupleᐸIServiceˏMyAccumulatorᐳ *-- MyAccumulator : MyAccumulator
Composition ..> ValueTupleᐸIServiceˏMyAccumulatorᐳ : ValueTupleᐸIServiceˏMyAccumulatorᐳ Root
Service *-- AbcDependency : typeof(Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency) IDependency
Service o-- "Singleton" XyzDependency : typeof(Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency) IDependency
Service o-- "PerBlock" AbcDependency : IDependency
Expand Down
12 changes: 6 additions & 6 deletions readme/advanced-interception.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,20 +155,20 @@ classDiagram
<<partial>>
+IService Root
}
Dependency --|> IDependency
class Dependency {
+Dependency()
}
Service --|> IService
class Service {
+Service(IDependency dependency)
}
class IDependency {
<<interface>>
Dependency --|> IDependency
class Dependency {
+Dependency()
}
class IService {
<<interface>>
}
class IDependency {
<<interface>>
}
Composition ..> Service : IService Root
Service *-- Dependency : IDependency
```
Expand Down
14 changes: 7 additions & 7 deletions readme/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ classDiagram
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
Service --|> IService
class Service {
+Service(ArrayᐸIDependencyᐳ dependencies)
}
class ArrayᐸIDependencyᐳ
AbcDependency --|> IDependency
class AbcDependency {
+AbcDependency()
Expand All @@ -226,15 +231,10 @@ classDiagram
class XyzDependency {
+XyzDependency()
}
Service --|> IService
class Service {
+Service(ArrayᐸIDependencyᐳ dependencies)
}
class ArrayᐸIDependencyᐳ
class IDependency {
class IService {
<<interface>>
}
class IService {
class IDependency {
<<interface>>
}
Composition ..> Service : IService Root
Expand Down
29 changes: 13 additions & 16 deletions readme/async-disposable-scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ partial class Composition: IDisposable, IAsyncDisposable
Func<Session> perBlockFunc1 = new Func<Session>([MethodImpl(MethodImplOptions.AggressiveInlining)] () =>
{
Composition transientComposition3 = this;
Session localValue71 = new Session(transientComposition3);
return localValue71;
Session localValue72 = new Session(transientComposition3);
return localValue72;
});
return new Program(perBlockFunc1);
}
Expand Down Expand Up @@ -229,37 +229,34 @@ classDiagram
}
Composition --|> IDisposable
Composition --|> IAsyncDisposable
class Session {
+Session(Composition composition)
}
class Program {
+Program(FuncᐸSessionᐳ sessionFactory)
Service --|> IService
class Service {
+Service(IDependency dependency)
}
class FuncᐸSessionᐳ
Dependency --|> IDependency
Dependency --|> IAsyncDisposable
class Dependency {
+Dependency()
}
Service --|> IService
class Service {
+Service(IDependency dependency)
class Session {
+Session(Composition composition)
}
class Composition
class FuncᐸSessionᐳ
class IDependency {
class IService {
<<interface>>
}
class IAsyncDisposable {
class IDependency {
<<interface>>
}
class IService {
class IAsyncDisposable {
<<interface>>
}
Session *-- Composition : Composition
Program o-- "PerBlock" FuncᐸSessionᐳ : FuncᐸSessionᐳ
Composition ..> Program : Program ProgramRoot
Composition ..> Service : IService SessionRoot
Program o-- "PerBlock" FuncᐸSessionᐳ : FuncᐸSessionᐳ
Service o-- "Scoped" Dependency : IDependency
FuncᐸSessionᐳ *-- Session : Session
Session *-- Composition : Composition
```

Loading

0 comments on commit b6f1c2c

Please sign in to comment.