bool IOptimizely.IsFeatureEnabled(OptimizelyFeatureParameters featureParameters) { if (featureParameters == null) { throw new ArgumentNullException(nameof(featureParameters)); } return(_optimizely.IsFeatureEnabled(featureParameters.FeatureKey, featureParameters.UserId, featureParameters.Attributes)); }
public bool IsFeatureEnabled(string feature, User user) { UserAttributes userAtrributes = new UserAttributes(); foreach (KeyValuePair <string, object> keyValuePair in user.GetAttributes()) { userAtrributes.Add(keyValuePair.Key, keyValuePair.Value); } return(_optimizelyClient.IsFeatureEnabled(feature.ToLower(), user.Email, userAtrributes)); }