Commit d105868
feat: Add Dependency Injection and Hosting support for OpenFeature (#310)
This pull request introduces key features and improvements to the
OpenFeature project, focusing on Dependency Injection and Hosting
support:
- **OpenFeature.DependencyInjection Project:**
- Implemented `OpenFeatureBuilder`, including
`OpenFeatureBuilderExtensions` for seamless integration.
- Added `IFeatureLifecycleManager` interface and its implementation.
- Introduced `AddProvider` extension method for easy provider
configuration.
- Created `OpenFeatureServiceCollectionExtensions` for service
registration.
- **OpenFeature.Hosting Project:**
- Added `HostedFeatureLifecycleService` to manage the lifecycle of
feature providers in hosted environments.
- **Testing Enhancements:**
- Created unit tests for critical methods, including
`OpenFeatureBuilderExtensionsTests` and
`OpenFeatureServiceCollectionExtensionsTests`.
- Replicated and tested `NoOpFeatureProvider` implementation for better
test coverage.
These changes significantly improve OpenFeature's extensibility and
lifecycle management for feature providers within Dependency Injection
(DI) and hosted environments.
Signed-off-by: Artyom Tonoyan <artonoyan@servicetitan.com>
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>1 parent b116b7e commit d105868
File tree
1 file changed
+1
-1
lines changed- src/OpenFeature.DependencyInjection
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
0 commit comments