Konsola git

Firebase.RemoteConfig.FirebaseRemoteConfig

Firebase Remote Config API.

Summary

Firebase Remote Config is a cloud service that lets you change the appearance and behavior of your app without requiring users to download an app update.

Properties

DefaultCacheExpiration
static System.TimeSpan
The default cache expiration used by Fetch(), equal to 12 hours.
Info
static ConfigInfo
A ConfigInfo struct, containing fields reflecting the state of the most recent fetch request.
Keys
static global::System.Collections.Generic.IEnumerable< string >
The set of all Remote Config parameter keys in the default namespace.
Settings
Gets and sets the configuration settings for operations.

Public static functions

ActivateFetched()
bool
Applies the most recently fetched data, so that its values can be accessed.
FetchAsync()
Fetches config data from the server.
FetchAsync(System.TimeSpan cacheExpiration)
Fetches config data from the server.
GetKeysByPrefix(string prefix)
global::System.Collections.Generic.IEnumerable< string >
Gets the set of keys that start with the given prefix.
GetValue(string key)
Gets the ConfigValue corresponding to the specified key.
SetDefaults(System.Collections.Generic.IDictionary< string, object > defaults)
void
Sets the default values based on a string dictionary.

Properties

DefaultCacheExpiration

static System.TimeSpan DefaultCacheExpiration

The default cache expiration used by Fetch(), equal to 12 hours.

Info

static ConfigInfo Info

A ConfigInfo struct, containing fields reflecting the state of the most recent fetch request.

Keys

static global::System.Collections.Generic.IEnumerable< string > Keys

The set of all Remote Config parameter keys in the default namespace.

Settings

static ConfigSettings Settings

Gets and sets the configuration settings for operations.

Get returns a copy of the current settings; to change the settings a ConfigSettings with the new settings needs to be set.

Public static functions

ActivateFetched

bool ActivateFetched()

Applies the most recently fetched data, so that its values can be accessed.

Calls to GetLong(), GetDouble(), GetString() and GetData() will not reflect the new data retrieved by Fetch() until ActivateFetched() is called. This gives the developer control over when newly fetched data is visible to their application.

true if a previously fetch configuration was activated, false if a fetched configuration wasn't found or the configuration was previously activated.

FetchAsync

System.Threading.Tasks.Task FetchAsync()

Fetches config data from the server.

This does not actually apply the data or make it accessible, it merely retrieves it and caches it. To accept and access the newly retrieved values, you must call ActivateFetched(). Note that this function is asynchronous, and will normally take an unspecified amount of time before completion.

A Future which can be used to determine when the fetch is complete.

FetchAsync

System.Threading.Tasks.Task FetchAsync(
  System.TimeSpan cacheExpiration
)

Fetches config data from the server.

Note:This does not actually apply the data or make it accessible, it merely retrieves it and caches it. To accept and access the newly retrieved values, you must call ActivateFetched(). Note that this function is asynchronous, and will normally take an unspecified amount of time before completion.

Details
Parameters
cacheExpiration
The time to keep previously fetch data available. If cached data is available that is newer than cacheExpiration, then the function returns immediately and does not fetch any data. A cacheExpiration of zero seconds will always cause a fetch.
Returns
A Task which can be used to determine when the fetch is complete.

GetKeysByPrefix

global::System.Collections.Generic.IEnumerable< string > GetKeysByPrefix(
  string prefix
)

Gets the set of keys that start with the given prefix.

Details
Parameters
prefix
The key prefix to look for. If empty or null, this method will return all keys. Set of Remote Config parameter keys that start with the specified prefix. Will return an empty set if there are no keys with the given prefix.

GetValue

ConfigValue GetValue(
  string key
)

Gets the ConfigValue corresponding to the specified key.

Details
Parameters
key
Key of the value to be retrieved.
Returns
The ConfigValue associated with the specified key.

SetDefaults

void SetDefaults(
  System.Collections.Generic.IDictionary< string, object > defaults
)

Sets the default values based on a string dictionary.

Note:This completely overrides all previous values.

Details
Parameters
defaults
IDictionary of string keys to values, representing the new set of defaults to apply. If the same key is specified multiple times, the value associated with the last duplicate key is applied.