Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow me to call GetVariant with context but without a default variant #145

Open
thomasheartman opened this issue Jun 12, 2023 · 0 comments
Assignees

Comments

@thomasheartman
Copy link
Contributor

Is your feature request related to a problem? Please describe.

When I use GetVariant with context (as you need to do when using gradual rollout and a number of other strategies + any constraints), I need to also provide a fallback value (default variant).

Now, I can import Unleash.Internal.Variant.DISABLED_VARIANT, but importing an Internal value feels dodgy. I could potentially create my own variant, but I'm not really interested in that.

All I want to do is to get the correct variant, and if the feature is disabled, then to get the disabled variant.

Describe the solution you'd like

I would like to an override that is GetVariant(featureName, context).
OR I would like GetVariant(featureName, context, null) to not throw a null reference exception. If the end user provides a null value, then the SDK should fall back to the disabled variant. (Is this a bug? 🐛 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants