Summary
This feature request aims to enhance the OpenFeature .NET SDK by enabling the addition of hooks to the global instance of OpenFeature using Dependency Injection (DI) syntax. This will align the SDK with common DI practices and improve its integration capabilities.
Additional Context:
As part of the DI library, the proposed implementation is expected to follow a syntax similar to the example below:
builder.Services.AddOpenFeature(openfeatureBuilder =>
{
openfeatureBuilder.AddHostedFeatureLifecycle()
.AddProvider(_ => new FlagdProvider())
.AddHook(_ => new LoggingHook());
});
This addition allows developers to seamlessly configure the OpenFeature global instance and integrate hooks using fluent builder methods.