Firebase.RemoteConfig.FirebaseRemoteConfig
Entry point for the Firebase C# SDK for Remote Config.
Summary
Properties | |
---|---|
AllValues | IDictionary< string, ConfigValue > Returns a Dictionary of Firebase Remote Config key value pairs. |
App | App object associated with this FirebaseRemoteConfig. |
ConfigSettings | Gets the current settings of the RemoteConfig object. |
DefaultCacheExpiration | static TimeSpan The default cache expiration used by FetchAsync(), equal to 12 hours. |
DefaultInstance | static FirebaseRemoteConfig Returns the FirebaseRemoteConfig initialized with the default FirebaseApp. |
DefaultTimeoutInMilliseconds | static ulong The default timeout used by FetchAsync(), equal to 30 seconds, in milliseconds. |
Info | Returns information about the last fetch request, in the form of a ConfigInfo object. |
Keys | IEnumerable< string > Gets the set of all Remote Config parameter keys. |
OnConfigUpdateListener | EventHandler< ConfigUpdateEventArgs > |
Public static functions | |
---|---|
GetInstance(FirebaseApp app) | Returns a FirebaseRemoteConfig, initialized with a custom Firebase App. |
Public functions | |
---|---|
ActivateAsync() | System.Threading.Tasks.Task< bool > Asynchronously activates the most recently fetched configs, so that the fetched key value pairs take effect. |
EnsureInitializedAsync() | async System.Threading.Tasks.Task< ConfigInfo > Returns a Task that contains ConfigInfo representing the initialization status of this Firebase Remote Config instance. |
FetchAndActivateAsync() | Task< bool > Asynchronously fetches and then activates the fetched configs. |
FetchAsync() | Task Fetches config data from the server. |
FetchAsync(TimeSpan cacheExpiration) | System.Threading.Tasks.Task Fetches config data from the server. |
GetKeysByPrefix(string prefix) | IEnumerable< string > Gets the set of keys that start with the given prefix. |
GetValue(string key) | Gets the ConfigValue corresponding to the key. |
SetConfigSettingsAsync(ConfigSettings settings) | Task Asynchronously changes the settings for this Remote Config instance. |
SetDefaultsAsync(IDictionary< string, object > defaults) | Task Sets the default values based on a string to object dictionary. |
Properties
AllValues
IDictionary< string, ConfigValue > AllValues
Returns a Dictionary of Firebase Remote Config key value pairs.
Evaluates the values of the parameters in the following order: The activated value, if the last successful ActivateAsync() contained the key. The default value, if the key was set with SetDefaultsAsync().
DefaultCacheExpiration
static TimeSpan DefaultCacheExpiration
The default cache expiration used by FetchAsync(), equal to 12 hours.
DefaultInstance
static FirebaseRemoteConfig DefaultInstance
Returns the FirebaseRemoteConfig initialized with the default FirebaseApp.
DefaultTimeoutInMilliseconds
static ulong DefaultTimeoutInMilliseconds
The default timeout used by FetchAsync(), equal to 30 seconds, in milliseconds.
Info
ConfigInfo Info
Returns information about the last fetch request, in the form of a ConfigInfo object.
Keys
IEnumerable< string > Keys
Gets the set of all Remote Config parameter keys.
OnConfigUpdateListener
EventHandler< ConfigUpdateEventArgs > OnConfigUpdateListener
Public static functions
GetInstance
FirebaseRemoteConfig GetInstance( FirebaseApp app )
Returns a FirebaseRemoteConfig, initialized with a custom Firebase App.
app The customer FirebaseApp used for initialization.
Details | |
---|---|
Returns | A FirebaseRemoteConfig instance. |
Public functions
EnsureInitializedAsync
async System.Threading.Tasks.Task< ConfigInfo > EnsureInitializedAsync()
Returns a Task that contains ConfigInfo representing the initialization status of this Firebase Remote Config instance.
Use this method to ensure Set/Get call not being blocked.
Details | |
---|---|
Returns | A Task contains ConfigInfo. |
FetchAndActivateAsync
Task< bool > FetchAndActivateAsync()
Asynchronously fetches and then activates the fetched configs.
If the time elapsed since the last fetch from the Firebase Remote Config backend is more than the default minimum fetch interval, configs are fetched from the backend.
After the fetch is complete, the configs are activated so that the fetched key value pairs take effect.
Details | |
---|---|
Returns | A Task that contains true if the call activated the fetched configs. The Task will contain false if the fetch failed, or the configs were already activated. |
FetchAsync
Task FetchAsync()
Fetches config data from the server.
Details | |
---|---|
Returns | A Task which can be used to determine with the fetch is complete. |
FetchAsync
System.Threading.Tasks.Task FetchAsync( TimeSpan cacheExpiration )
Fetches config data from the server.
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | A Task which can be used to determine with the fetch is complete. |
SetConfigSettingsAsync
Task SetConfigSettingsAsync( ConfigSettings settings )
Asynchronously changes the settings for this Remote Config instance.
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | a Task which can be used to determine when the operation is complete. |
SetDefaultsAsync
Task SetDefaultsAsync( IDictionary< string, object > defaults )
Sets the default values based on a string to object dictionary.
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | A Task which can be used to determine when the operation is complete. |