Commit f8926ce
committed
feat: add modular framework infrastructure primitives
P0 - Async service registration:
- Add ConfigureServicesAsync/PreConfigureServicesAsync/PostConfigureServicesAsync to ModuleBase
- Add AddModuleAsync and AddModularApplicationAsync for async module registration paths
- Refactor PrepareModuleGraph as shared helper for sync and async paths
P0 - Configuration access during registration:
- Add IConfiguration? to ServiceConfigurationContext (auto-resolved from IServiceCollection)
- Add Microsoft.Extensions.Configuration.Abstractions to Core project
P1 - ObjectAccessor<T>:
- Add IObjectAccessor<T>, ObjectAccessor<T> for typed registration-time sharing
- Add AddObjectAccessor, TryAddObjectAccessor, GetObject, GetObjectOrNull extensions
P1 - PreConfigure<T>:
- Add PreConfigureActionList<T> for accumulating pre-configuration actions
- Add PreConfigure<T>, ExecutePreConfiguredActions<T> extensions on IServiceCollection
- Add PreConfigure<T> helper on ModuleBase
P1 - IModuleLifecycleContributor:
- Add IModuleLifecycleContributor interface and ModuleLifecycleOptions
- Integrate contributors into ModuleManager init/shutdown loops
- Contributors resolved via ActivatorUtilities for flexible DI
P1 - Conventional DI registration:
- Add ITransientService, IScopedService, ISingletonService marker interfaces
- Add DisableConventionalRegistrationAttribute opt-out
- Add AddConventionalServices(Assembly) with naming convention matching
Tests: 30 new tests across 5 test files (351 total, 0 failures)1 parent 701db81 commit f8926ce
File tree
67 files changed
+1408
-590
lines changed- src
- Applications
- AuditLogging
- ChengYuan.AuditLogging.Application
- ChengYuan.AuditLogging.Persistence
- FeatureManagement
- ChengYuan.FeatureManagement.Application
- ChengYuan.FeatureManagement.Persistence
- Identity
- ChengYuan.Identity.Application
- ChengYuan.Identity.Domain
- ChengYuan.Identity.Persistence
- PermissionManagement
- ChengYuan.PermissionManagement.Application
- ChengYuan.PermissionManagement.Persistence
- SettingManagement
- ChengYuan.SettingManagement.Application
- ChengYuan.SettingManagement.Persistence
- TenantManagement
- ChengYuan.TenantManagement.Application
- ChengYuan.TenantManagement.Persistence
- Framework
- BackgroundJobs/ChengYuan.BackgroundJobs.Runtime
- BackgroundWorkers
- ChengYuan.BackgroundWorkers.Abstractions
- ChengYuan.BackgroundWorkers.Runtime
- BlobStoring/ChengYuan.BlobStoring.Runtime
- Caching
- ChengYuan.Caching.Memory
- ChengYuan.Caching.Runtime
- Core
- Runtime
- DependencyInjection
- Modularity
- Data
- ChengYuan.Data.Sqlite
- ChengYuan.EntityFrameworkCore
- DistributedLocking/ChengYuan.DistributedLocking.Runtime
- Emailing/ChengYuan.Emailing.Runtime
- EventBus/ChengYuan.EventBus.Runtime
- ExecutionContext/ChengYuan.ExecutionContext.Runtime
- Features/ChengYuan.Features.Runtime
- Interceptors/ChengYuan.Interceptors.Runtime
- Notifications/ChengYuan.Notifications.Runtime
- ObjectMapping/ChengYuan.ObjectMapping.Runtime
- Outbox
- ChengYuan.Outbox.Persistence
- ChengYuan.Outbox.Runtime
- ChengYuan.Outbox.Worker
- Settings/ChengYuan.Settings.Runtime
- Sms/ChengYuan.Sms.Runtime
- TextTemplating/ChengYuan.TextTemplating.Runtime
- VirtualFileSystem/ChengYuan.VirtualFileSystem.Runtime
- Hosts/CliHost
- tests
- ChengYuan.ArchitectureTests
- Structure
- ChengYuan.FrameworkKernel.Tests
- Framework/Core
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
67 files changed
+1408
-590
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
54 | 64 | | |
55 | 65 | | |
56 | 66 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
123 | 133 | | |
124 | 134 | | |
125 | 135 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
129 | 139 | | |
130 | 140 | | |
131 | 141 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
21 | 31 | | |
22 | 32 | | |
23 | 33 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
129 | 139 | | |
130 | 140 | | |
131 | 141 | | |
| |||
0 commit comments