mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-23 21:13:35 +00:00
docs: update architecture diagram in README to show adapter-centric universalRegistration pattern
This commit is contained in:
@@ -189,27 +189,29 @@ classDiagram
|
|||||||
class BenchmarkCliRunner {
|
class BenchmarkCliRunner {
|
||||||
+run(args)
|
+run(args)
|
||||||
}
|
}
|
||||||
class UniversalChainBenchmark {
|
class UniversalChainBenchmark~TContainer~ {
|
||||||
+setup()
|
+setup()
|
||||||
+run()
|
+run()
|
||||||
+teardown()
|
+teardown()
|
||||||
}
|
}
|
||||||
class UniversalChainAsyncBenchmark {
|
class UniversalChainAsyncBenchmark~TContainer~ {
|
||||||
+setup()
|
+setup()
|
||||||
+run()
|
+run()
|
||||||
+teardown()
|
+teardown()
|
||||||
}
|
}
|
||||||
class DIAdapter {
|
class DIAdapter~TContainer~ {
|
||||||
<<interface>>
|
<<interface>>
|
||||||
+setupDependencies(cb)
|
+setupDependencies(cb)
|
||||||
+resolve<T>(named)
|
+resolve~T~(named)
|
||||||
+resolveAsync<T>(named)
|
+resolveAsync~T~(named)
|
||||||
+teardown()
|
+teardown()
|
||||||
+openSubScope(name)
|
+openSubScope(name)
|
||||||
+waitForAsyncReady()
|
+waitForAsyncReady()
|
||||||
|
+universalRegistration<S extends Enum>(...)
|
||||||
}
|
}
|
||||||
class CherrypickDIAdapter
|
class CherrypickDIAdapter
|
||||||
class GetItAdapter
|
class GetItAdapter
|
||||||
|
class RiverpodAdapter
|
||||||
class UniversalChainModule {
|
class UniversalChainModule {
|
||||||
+builder(scope)
|
+builder(scope)
|
||||||
+chainCount
|
+chainCount
|
||||||
@@ -225,15 +227,12 @@ classDiagram
|
|||||||
class UniversalServiceImpl {
|
class UniversalServiceImpl {
|
||||||
+UniversalServiceImpl(value, dependency)
|
+UniversalServiceImpl(value, dependency)
|
||||||
}
|
}
|
||||||
class di_universal_registration {
|
|
||||||
+getUniversalRegistration(adapter, ...)
|
|
||||||
}
|
|
||||||
class Scope
|
class Scope
|
||||||
class UniversalScenario
|
class UniversalScenario
|
||||||
class UniversalBindingMode
|
class UniversalBindingMode
|
||||||
|
|
||||||
%% Relationships
|
%% Relationships
|
||||||
|
|
||||||
BenchmarkCliRunner --> UniversalChainBenchmark
|
BenchmarkCliRunner --> UniversalChainBenchmark
|
||||||
BenchmarkCliRunner --> UniversalChainAsyncBenchmark
|
BenchmarkCliRunner --> UniversalChainAsyncBenchmark
|
||||||
|
|
||||||
@@ -242,9 +241,11 @@ classDiagram
|
|||||||
|
|
||||||
DIAdapter <|.. CherrypickDIAdapter
|
DIAdapter <|.. CherrypickDIAdapter
|
||||||
DIAdapter <|.. GetItAdapter
|
DIAdapter <|.. GetItAdapter
|
||||||
|
DIAdapter <|.. RiverpodAdapter
|
||||||
|
|
||||||
CherrypickDIAdapter ..> Scope
|
CherrypickDIAdapter ..> Scope
|
||||||
GetItAdapter ..> GetIt: "uses GetIt"
|
GetItAdapter ..> GetIt: "uses GetIt"
|
||||||
|
RiverpodAdapter ..> Map~String, ProviderBase~: "uses Provider registry"
|
||||||
|
|
||||||
DIAdapter o--> UniversalChainModule : setupDependencies
|
DIAdapter o--> UniversalChainModule : setupDependencies
|
||||||
|
|
||||||
@@ -255,11 +256,10 @@ classDiagram
|
|||||||
UniversalService <|.. UniversalServiceImpl
|
UniversalService <|.. UniversalServiceImpl
|
||||||
UniversalServiceImpl --> UniversalService : dependency
|
UniversalServiceImpl --> UniversalService : dependency
|
||||||
|
|
||||||
BenchmarkCliRunner ..> di_universal_registration : uses
|
%%
|
||||||
di_universal_registration ..> DIAdapter
|
%% Each concrete adapter implements universalRegistration<S extends Enum>
|
||||||
|
%% You can add new scenario enums for custom adapters
|
||||||
UniversalChainBenchmark ..> di_universal_registration : uses registrar
|
%% Extensibility is achieved via adapter logic, not global functions
|
||||||
UniversalChainAsyncBenchmark ..> di_universal_registration : uses registrar
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -140,27 +140,29 @@ classDiagram
|
|||||||
class BenchmarkCliRunner {
|
class BenchmarkCliRunner {
|
||||||
+run(args)
|
+run(args)
|
||||||
}
|
}
|
||||||
class UniversalChainBenchmark {
|
class UniversalChainBenchmark~TContainer~ {
|
||||||
+setup()
|
+setup()
|
||||||
+run()
|
+run()
|
||||||
+teardown()
|
+teardown()
|
||||||
}
|
}
|
||||||
class UniversalChainAsyncBenchmark {
|
class UniversalChainAsyncBenchmark~TContainer~ {
|
||||||
+setup()
|
+setup()
|
||||||
+run()
|
+run()
|
||||||
+teardown()
|
+teardown()
|
||||||
}
|
}
|
||||||
class DIAdapter {
|
class DIAdapter~TContainer~ {
|
||||||
<<interface>>
|
<<interface>>
|
||||||
+setupDependencies(cb)
|
+setupDependencies(cb)
|
||||||
+resolve<T>(named)
|
+resolve~T~(named)
|
||||||
+resolveAsync<T>(named)
|
+resolveAsync~T~(named)
|
||||||
+teardown()
|
+teardown()
|
||||||
+openSubScope(name)
|
+openSubScope(name)
|
||||||
+waitForAsyncReady()
|
+waitForAsyncReady()
|
||||||
|
+universalRegistration<S extends Enum>(...)
|
||||||
}
|
}
|
||||||
class CherrypickDIAdapter
|
class CherrypickDIAdapter
|
||||||
class GetItAdapter
|
class GetItAdapter
|
||||||
|
class RiverpodAdapter
|
||||||
class UniversalChainModule {
|
class UniversalChainModule {
|
||||||
+builder(scope)
|
+builder(scope)
|
||||||
+chainCount
|
+chainCount
|
||||||
@@ -176,15 +178,12 @@ classDiagram
|
|||||||
class UniversalServiceImpl {
|
class UniversalServiceImpl {
|
||||||
+UniversalServiceImpl(value, dependency)
|
+UniversalServiceImpl(value, dependency)
|
||||||
}
|
}
|
||||||
class di_universal_registration {
|
|
||||||
+getUniversalRegistration(adapter, ...)
|
|
||||||
}
|
|
||||||
class Scope
|
class Scope
|
||||||
class UniversalScenario
|
class UniversalScenario
|
||||||
class UniversalBindingMode
|
class UniversalBindingMode
|
||||||
|
|
||||||
%% Relationships
|
%% Relationships
|
||||||
|
|
||||||
BenchmarkCliRunner --> UniversalChainBenchmark
|
BenchmarkCliRunner --> UniversalChainBenchmark
|
||||||
BenchmarkCliRunner --> UniversalChainAsyncBenchmark
|
BenchmarkCliRunner --> UniversalChainAsyncBenchmark
|
||||||
|
|
||||||
@@ -193,9 +192,11 @@ classDiagram
|
|||||||
|
|
||||||
DIAdapter <|.. CherrypickDIAdapter
|
DIAdapter <|.. CherrypickDIAdapter
|
||||||
DIAdapter <|.. GetItAdapter
|
DIAdapter <|.. GetItAdapter
|
||||||
|
DIAdapter <|.. RiverpodAdapter
|
||||||
|
|
||||||
CherrypickDIAdapter ..> Scope
|
CherrypickDIAdapter ..> Scope
|
||||||
GetItAdapter ..> GetIt: "uses GetIt"
|
GetItAdapter ..> GetIt: "uses GetIt"
|
||||||
|
RiverpodAdapter ..> Map~String, ProviderBase~: "uses Provider registry"
|
||||||
|
|
||||||
DIAdapter o--> UniversalChainModule : setupDependencies
|
DIAdapter o--> UniversalChainModule : setupDependencies
|
||||||
|
|
||||||
@@ -206,11 +207,10 @@ classDiagram
|
|||||||
UniversalService <|.. UniversalServiceImpl
|
UniversalService <|.. UniversalServiceImpl
|
||||||
UniversalServiceImpl --> UniversalService : dependency
|
UniversalServiceImpl --> UniversalService : dependency
|
||||||
|
|
||||||
BenchmarkCliRunner ..> di_universal_registration : uses
|
%%
|
||||||
di_universal_registration ..> DIAdapter
|
%% Each concrete adapter implements universalRegistration<S extends Enum>
|
||||||
|
%% You can add new scenario enums for custom adapters
|
||||||
UniversalChainBenchmark ..> di_universal_registration : uses registrar
|
%% Extensibility is achieved via adapter logic, not global functions
|
||||||
UniversalChainAsyncBenchmark ..> di_universal_registration : uses registrar
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user