microsoft / FeatureManagement-Dotnet

Microsoft.FeatureManagement provides standardized APIs for enabling feature flags within applications. Utilize this library to secure a consistent experience when developing applications that use patterns such as beta access, rollout, dark deployments, and more.
MIT License
1.02k stars 111 forks source link

Warning log missing targeting context accessor #426

Closed rossgrambo closed 4 months ago

rossgrambo commented 4 months ago

Why this PR?

Adjusts warning logs identified in https://github.com/microsoft/FeatureManagement-Dotnet/issues/425

Visible Changes

Developers will no longer see this warning when using flags that don't require TargetingContext.

No instance of ITargetingContextAccessor is available for variant assignment.

This warning will only show if they have variants defined and we've reached the place in code where allocation would happen.