-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Summary
Enhance the .NET code generator to leverage the latest improvements from openfeature/dotnet-sdk, specifically using OpenFeature.DependencyInjection or OpenFeature.Hosting packages to generate code that better aligns with modern .NET dependency injection patterns and the SDK's recommended practices.
Motivation
The current generated code doesn't fully embrace the DI-first philosophy of the underlying OpenFeature SDK. By utilizing the official DI packages, we can:
- Generate code that follows .NET best practices and conventions
- Provide better integration with ASP.NET Core and other .NET hosting scenarios
- Reduce boilerplate and improve developer experience
- Ensure generated code stays aligned with SDK evolution and recommendations
Proposed Solution
Update the dotnet generator to:
- Include
OpenFeature.DependencyInjectionorOpenFeature.Hostingpackage references in generated projects - Generate service registration code using
OpenFeature.DependencyInjectionorOpenFeature.Hostingwith extension methods
Related Issues
- Builds upon fix: dotnet generated code dependency injection issue #208 which provides a quick-fix for DI issues using .NET Standard as a first step
- This issue represents the longer-term, more comprehensive solution
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels