You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add integration for C# using a custom .NET Source Generator for flag calls #171
Propose adding a new integration for C# to the CLI that leverages a custom .NET Source Generator. This generator will automatically create code for feature flag calls, streamlining flag management and usage in C# projects. We would keep the current csharp generation in the CLI but adding a new one for the source generators.
Motivation
Enable seamless integration of OpenFeature in C# projects by automating the generation of flag call code.
Reduce boilerplate and potential errors in flag usage.
Improve developer productivity and code maintainability.
Approach
Design and implement a custom .NET Source Generator that can parse feature flag definitions and generate corresponding C# code for flag calls.
Integrate this workflow into the OpenFeature CLI so C# developers can easily set up and use this functionality.
Provide documentation and usage examples for the new integration.
Tasks
Research .NET Source Generators and their integration points with OpenFeature.
Define the input format and configuration for flag definitions. I suggest using Attributes.
Implement the source generator logic.
Update the CLI to support C# integration using the generator.
Write documentation and sample usage code.
Additional Context
This enhancement would provide first-class support for C# developers using OpenFeature, leveraging modern .NET tooling to make flag usage safer and more efficient.
By leveraging source generators for the C# implementation, it would give more flexibility because anyone could potentially make use of it, even without using the CLI.
Activity