using Bit.Core.Context;
namespace Bit.Core.Services;
public interface IFeatureService
{
///
/// Checks whether online access to feature status is available.
///
/// True if the service is online, otherwise false.
bool IsOnline();
///
/// Checks whether a given feature is enabled.
///
/// The key of the feature to check.
/// A context providing information that can be used to evaluate whether a feature should be on or off.
/// The default value for the feature.
/// True if the feature is enabled, otherwise false.
bool IsEnabled(string key, ICurrentContext currentContext, bool defaultValue = false);
///
/// Gets the integer variation of a feature.
///
/// The key of the feature to check.
/// A context providing information that can be used to evaluate the feature value.
/// The default value for the feature.
/// The feature variation value.
int GetIntVariation(string key, ICurrentContext currentContext, int defaultValue = 0);
///
/// Gets the string variation of a feature.
///
/// The key of the feature to check.
/// A context providing information that can be used to evaluate the feature value.
/// The default value for the feature.
/// The feature variation value.
string GetStringVariation(string key, ICurrentContext currentContext, string defaultValue = null);
///
/// Gets all feature values.
///
/// A context providing information that can be used to evaluate the feature values.
/// A dictionary of feature keys and their values.
Dictionary GetAll(ICurrentContext currentContext);
}