Skip to content

Commit

Permalink
Improved class diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayPianikov committed Nov 30, 2024
1 parent 2500547 commit 03d548a
Show file tree
Hide file tree
Showing 104 changed files with 3,092 additions and 1,978 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ _Supports .NET starting with .NET Framework 2.0, released 2005-10-27, and all ne
## Usage requirements

- .NET SDK [6.0.4](https://dotnet.microsoft.com/download/dotnet/6.0) or later is installed
- Using [C# 8](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-80) or later version

At the same time, projects can be developed for older versions of .NET, starting with .NET Framework 2.0 released on 2005-10-27.

- [C# 8](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-80) or later

This requirement only needs to be met for projects that reference the _Pure.DI_ source code generator, other projects can use any version of C#.

## Key features

Expand Down
9 changes: 5 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ _Supports .NET starting with .NET Framework 2.0, released 2005-10-27, and all ne
## Usage requirements

- .NET SDK [6.0.4](https://dotnet.microsoft.com/download/dotnet/6.0) or later is installed
> [!NOTE]
> At the same time, projects can be developed for older versions of .NET, starting with .NET Framework 2.0 released on 2005-10-27.

At the same time, projects can be developed for older versions of .NET, starting with .NET Framework 2.0 released on 2005-10-27.

- [C# 8](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-80) or later
> [!NOTE]
> This requirement only needs to be met for projects that reference the _Pure.DI_ source code generator, other projects can use any version of C#.

This requirement only needs to be met for projects that reference the _Pure.DI_ source code generator, other projects can use any version of C#.

## Key features

Expand Down
99 changes: 57 additions & 42 deletions readme/ArrayDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,19 @@ Creating an object graph of 27 transient objects, including 4 transient array ob

### Class diagram
```mermaid
---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class Array {
<<partial>>
+CompositionRoot TestPureDIByCR()
+ T ResolveᐸTᐳ()
+ T ResolveᐸTᐳ(object? tag)
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
Service1 --|> IService1
class Service1 {
+Service1(IService2 service2)
}
Service2Array --|> IService2
class Service2Array {
+Service2Array(ArrayᐸIService3ᐳ services)
}
Service3 --|> IService3
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)
}
Service3v3 --|> IService3 : 3
class Service3v3 {
+Service3v3(IService4 service41, IService4 service42)
}
Service3v4 --|> IService3 : 4
class Service3v4 {
+Service3v4(IService4 service41, IService4 service42)
}
class IService1 {
<<interface>>
}
class IService2 {
<<interface>>
}
class IService3 {
<<interface>>
}
class IService4 {
<<interface>>
}
Array ..> CompositionRoot : CompositionRoot TestPureDIByCR()
CompositionRoot *-- Service1 : IService1
CompositionRoot *-- "3 " Service2Array : IService2
Expand All @@ -69,6 +32,58 @@ classDiagram
Service3v2 *-- "2 " Service4 : IService4
Service3v3 *-- "2 " Service4 : IService4
Service3v4 *-- "2 " Service4 : IService4
namespace Pure.DI.Benchmarks.Benchmarks {
class Array {
<<partial>>
+CompositionRoot TestPureDIByCR()
+ T ResolveᐸTᐳ()
+ T ResolveᐸTᐳ(object? tag)
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
}
namespace Pure.DI.Benchmarks.Model {
class CompositionRoot {
}
class IService1 {
<<interface>>
}
class IService2 {
<<interface>>
}
class IService3 {
<<interface>>
}
class IService4 {
<<interface>>
}
class Service1 {
+Service1(IService2 service2)
}
class Service2Array {
+Service2Array(ArrayᐸIService3ᐳ services)
}
class Service3 {
+Service3(IService4 service41, IService4 service42)
}
class Service3v2 {
+Service3v2(IService4 service41, IService4 service42)
}
class Service3v3 {
+Service3v3(IService4 service41, IService4 service42)
}
class Service3v4 {
+Service3v4(IService4 service41, IService4 service42)
}
class Service4 {
+Service4()
}
}
namespace System {
class ArrayᐸIService3ᐳ {
<<array>>
}
}
```

### Generated code
Expand Down
99 changes: 57 additions & 42 deletions readme/EnumDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,19 @@ Creating an object graph of 12 transient objects, including 1 transient enumerab

### Class diagram
```mermaid
---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class Enum {
<<partial>>
+CompositionRoot TestPureDIByCR()
+ T ResolveᐸTᐳ()
+ T ResolveᐸTᐳ(object? tag)
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
Service1 --|> IService1
class Service1 {
+Service1(IService2 service2)
}
Service2Enum --|> IService2
class Service2Enum {
+Service2Enum(IEnumerableᐸIService3ᐳ services)
}
Service3 --|> IService3
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)
}
Service3v3 --|> IService3 : 3
class Service3v3 {
+Service3v3(IService4 service41, IService4 service42)
}
Service3v4 --|> IService3 : 4
class Service3v4 {
+Service3v4(IService4 service41, IService4 service42)
}
class IService1 {
<<interface>>
}
class IService2 {
<<interface>>
}
class IService3 {
<<interface>>
}
class IService4 {
<<interface>>
}
Enum ..> CompositionRoot : CompositionRoot TestPureDIByCR()
CompositionRoot *-- Service1 : IService1
CompositionRoot *-- "3 " Service2Enum : IService2
Expand All @@ -69,6 +32,58 @@ classDiagram
Service3v2 *-- "2 " Service4 : IService4
Service3v3 *-- "2 " Service4 : IService4
Service3v4 *-- "2 " Service4 : IService4
namespace Pure.DI.Benchmarks.Benchmarks {
class Enum {
<<partial>>
+CompositionRoot TestPureDIByCR()
+ T ResolveᐸTᐳ()
+ T ResolveᐸTᐳ(object? tag)
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
}
namespace Pure.DI.Benchmarks.Model {
class CompositionRoot {
}
class IService1 {
<<interface>>
}
class IService2 {
<<interface>>
}
class IService3 {
<<interface>>
}
class IService4 {
<<interface>>
}
class Service1 {
+Service1(IService2 service2)
}
class Service2Enum {
+Service2Enum(IEnumerableᐸIService3ᐳ services)
}
class Service3 {
+Service3(IService4 service41, IService4 service42)
}
class Service3v2 {
+Service3v2(IService4 service41, IService4 service42)
}
class Service3v3 {
+Service3v3(IService4 service41, IService4 service42)
}
class Service3v4 {
+Service3v4(IService4 service41, IService4 service42)
}
class Service4 {
+Service4()
}
}
namespace System.Collections.Generic {
class IEnumerableᐸIService3ᐳ {
<<interface>>
}
}
```

### Generated code
Expand Down
81 changes: 48 additions & 33 deletions readme/FuncDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,16 @@ Creating an object graph of 7 transition objects plus 1 `Func<T>` with additiona

### Class diagram
```mermaid
---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class Func {
<<partial>>
+CompositionRoot TestPureDIByCR()
+ T ResolveᐸTᐳ()
+ T ResolveᐸTᐳ(object? tag)
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
Service1 --|> IService1
class Service1 {
+Service1(IService2 service2)
}
Service2Func --|> IService2
class Service2Func {
+Service2Func(FuncᐸIService3ᐳ service3Factory)
}
Service3 --|> IService3
class Service3 {
+Service3(IService4 service41, IService4 service42)
}
Service4 --|> IService4
class Service4 {
+Service4()
}
class FuncᐸIService3ᐳ
class IService1 {
<<interface>>
}
class IService2 {
<<interface>>
}
class IService3 {
<<interface>>
}
class IService4 {
<<interface>>
}
Func ..> CompositionRoot : CompositionRoot TestPureDIByCR()
CompositionRoot *-- Service1 : IService1
CompositionRoot *-- "3 " Service2Func : IService2
Expand All @@ -51,6 +23,49 @@ classDiagram
Service2Func o-- "PerBlock" FuncᐸIService3ᐳ : FuncᐸIService3ᐳ
Service3 *-- "2 " Service4 : IService4
FuncᐸIService3ᐳ *-- Service3 : IService3
namespace Pure.DI.Benchmarks.Benchmarks {
class Func {
<<partial>>
+CompositionRoot TestPureDIByCR()
+ T ResolveᐸTᐳ()
+ T ResolveᐸTᐳ(object? tag)
+ object Resolve(Type type)
+ object Resolve(Type type, object? tag)
}
}
namespace Pure.DI.Benchmarks.Model {
class CompositionRoot {
}
class IService1 {
<<interface>>
}
class IService2 {
<<interface>>
}
class IService3 {
<<interface>>
}
class IService4 {
<<interface>>
}
class Service1 {
+Service1(IService2 service2)
}
class Service2Func {
+Service2Func(FuncᐸIService3ᐳ service3Factory)
}
class Service3 {
+Service3(IService4 service41, IService4 service42)
}
class Service4 {
+Service4()
}
}
namespace System {
class FuncᐸIService3ᐳ {
<<delegate>>
}
}
```

### Generated code
Expand Down
Loading

0 comments on commit 03d548a

Please sign in to comment.