Allow me to call GetVariant
with context but without a default variant
#145
Labels
GetVariant
with context but without a default variant
#145
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 anInternal
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 anull
value, then the SDK should fall back to the disabled variant. (Is this a bug? 🐛 )The text was updated successfully, but these errors were encountered: