MagifyManager․Features
Overview
This part of the MagifyManager
provides access to remote features.
OnFeaturesParsed
event Action<ConfigKind> OnFeaturesParsed;
The event is triggered when features list or values are parsed
OnFeaturesUpdated
event Action OnFeaturesUpdated
The event is triggered every time a features list or values are updated (after synchronizing the config, changing the filtering).
IsCurrentFeaturesParsed
bool IsCurrentFeaturesParsed
The field returns true if there is an actual config (the one that was downloaded from the backend) and that was successfully parsed.
StoredAppFeatures
IStoredAppFeaturesCollection StoredAppFeatures
Returns read-only reactive collection of current stored app features.
TryGetBool
bool TryGetBool(string featureName, out Feature<bool> result)
The method will return true
if it was possible to get a bool
value for featureName
, the obtained value will be put into result, otherwise the method will return false
.
GetBool
Feature<bool> GetBool(string featureName)
The method will return a bool
value for featureName
, if the value cannot be received an ArgumentException
will be thrown.
TryGetNumber
bool TryGetNumber(string featureName, out Feature<double> result)
The method will return true
if it was possible to get a double
value for featureName
, the obtained value will be put into result, otherwise the method will return false
.
GetNumber
Feature<double> GetNumber(string featureName)
The method will return a double
value for featureName
, if the value cannot be received an ArgumentException
will be thrown.
TryGetString
bool TryGetString(string featureName, out Feature<string> result)
The method will return true
if it was possible to get a string
value for featureName
, the obtained value will be put into result, otherwise the method will return false
.
GetString
Feature<string> GetString(string featureName)
The method will return a string
value for featureName
, if the value cannot be received an ArgumentException
will be thrown.
SetIgnoredFeatures
SetIgnoredFeatures(IEnumerable<string> features, FeatureSource source)
Allows you to ignore features from a specific source (config)