Skip to content

Commit d105868

Browse files
arttonoyanaskpt
authored andcommitted
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

1 file changed

+1
-1
lines changed

src/OpenFeature.DependencyInjection/OpenFeature.DependencyInjection.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0;net8.0;net9.0;net462</TargetFrameworks>

0 commit comments

Comments
 (0)