Skip to content

Commit

Permalink
feat: Add Dependency Injection and Hosting support for OpenFeature (#310
Browse files Browse the repository at this point in the history
)

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 <[email protected]>
Signed-off-by: André Silva <[email protected]>
  • Loading branch information
arttonoyan authored and askpt committed Nov 18, 2024
1 parent b116b7e commit d105868
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net8.0;net9.0;net462</TargetFrameworks>
Expand Down

0 comments on commit d105868

Please sign in to comment.