Class ConfigManagerImpl
Namespace: Unity.Services.RemoteConfig
Syntax
public class ConfigManagerImpl
Constructors
ConfigManagerImpl(String, String, String)
Constructor for the ConfigManagerImpl.
Declaration
public ConfigManagerImpl(string originService, string attributionMetadataStr = "", string cacheFileRC = "RemoteConfigCache.json")
Parameters
Type | Name | Description |
---|---|---|
String | originService | Represents the origin for request, e.g 'GameSim' |
String | attributionMetadataStr | An attribution string to ascribe metadata |
String | cacheFileRC | remote config cache file |
Properties
appConfig
Declaration
public RuntimeConfig appConfig { get; }
Property Value
Type | Description |
---|---|
RuntimeConfig |
Methods
FetchConfigs(Object, Object)
Fetches an app configuration settings from the remote server.
Declaration
public void FetchConfigs(object userAttributes, object appAttributes)
Parameters
Type | Name | Description |
---|---|---|
Object | userAttributes | A struct containing custom user attributes. If none apply, use null. |
Object | appAttributes | A struct containing custom app attributes. If none apply, use null. |
FetchConfigs(Object, Object, Object)
Fetches an app configuration settings from the remote server passing filterAttributes.
Declaration
public void FetchConfigs(object userAttributes, object appAttributes, object filterAttributes)
Parameters
Type | Name | Description |
---|---|---|
Object | userAttributes | A struct containing custom user attributes. If none apply, use null. |
Object | appAttributes | A struct containing custom app attributes. If none apply, use null. |
Object | filterAttributes | A struct containing filter attributes. If none apply, use an empty struct. |
FetchConfigs(String, Object, Object)
Fetches an app configuration settings from the remote server passing a configType.
Declaration
public void FetchConfigs(string configType, object userAttributes, object appAttributes)
Parameters
Type | Name | Description |
---|---|---|
String | configType | A string containing configType. If none apply, use null. |
Object | userAttributes | A struct containing custom user attributes. If none apply, use null. |
Object | appAttributes | A struct containing custom app attributes. If none apply, use null. |
FetchConfigs(String, Object, Object, Object)
Fetches an app configuration settings from the remote server passing a configType.
Declaration
public void FetchConfigs(string configType, object userAttributes, object appAttributes, object filterAttributes)
Parameters
Type | Name | Description |
---|---|---|
String | configType | A string containing configType. If none apply, use null. |
Object | userAttributes | A struct containing custom user attributes. If none apply, use null. |
Object | appAttributes | A struct containing custom app attributes. If none apply, use null. |
Object | filterAttributes | A struct containing filter attributes. If none apply, use an empty struct. |
FetchConfigs<T, T2>(T, T2)
Fetches an app configuration settings from the remote server.
Declaration
public void FetchConfigs<T, T2>(T userAttributes, T2 appAttributes)
where T : struct where T2 : struct
Parameters
Type | Name | Description |
---|---|---|
T | userAttributes | A struct containing custom user attributes. If none apply, use an empty struct. |
T2 | appAttributes | A struct containing custom app attributes. If none apply, use an empty struct. |
Type Parameters
Name | Description |
---|---|
T | The type of the |
T2 | The type of the |
FetchConfigs<T, T2>(String, T, T2)
Fetches an app configuration settings from the remote server passing a configType.
Declaration
public void FetchConfigs<T, T2>(string configType, T userAttributes, T2 appAttributes)
where T : struct where T2 : struct
Parameters
Type | Name | Description |
---|---|---|
String | configType | A string containing configType. If none apply, use null. |
T | userAttributes | A struct containing custom user attributes. If none apply, use an empty struct. |
T2 | appAttributes | A struct containing custom app attributes. If none apply, use an empty struct. |
Type Parameters
Name | Description |
---|---|
T | The type of the |
T2 | The type of the |
FetchConfigs<T, T2, T3>(T, T2, T3)
Fetches an app configuration settings from the remote server passing filterAttributes.
Declaration
public void FetchConfigs<T, T2, T3>(T userAttributes, T2 appAttributes, T3 filterAttributes)
where T : struct where T2 : struct where T3 : struct
Parameters
Type | Name | Description |
---|---|---|
T | userAttributes | A struct containing custom user attributes. If none apply, use an empty struct. |
T2 | appAttributes | A struct containing custom app attributes. If none apply, use an empty struct. |
T3 | filterAttributes | A struct containing filter attributes. If none apply, use an empty struct. |
Type Parameters
Name | Description |
---|---|
T | The type of the |
T2 | The type of the |
T3 | The type of the |
FetchConfigs<T, T2, T3>(String, T, T2, T3)
Fetches an app configuration settings from the remote server passing a configType and filterAttributes.
Declaration
public void FetchConfigs<T, T2, T3>(string configType, T userAttributes, T2 appAttributes, T3 filterAttributes)
where T : struct where T2 : struct where T3 : struct
Parameters
Type | Name | Description |
---|---|---|
String | configType | A string containing configType. If none apply, use empty string. |
T | userAttributes | A struct containing custom user attributes. If none apply, use an empty struct. |
T2 | appAttributes | A struct containing custom app attributes. If none apply, use an empty struct. |
T3 | filterAttributes | A struct containing filter attributes. If none apply, use an empty struct. |
Type Parameters
Name | Description |
---|---|
T | The type of the |
T2 | The type of the |
T3 | The type of the |
FetchConfigsAsync(Object, Object)
Fetches an app configuration settings from the remote server.
Declaration
public async Task<RuntimeConfig> FetchConfigsAsync(object userAttributes, object appAttributes)
Parameters
Type | Name | Description |
---|---|---|
Object | userAttributes | A struct containing custom user attributes. If none apply, use null. |
Object | appAttributes | A struct containing custom app attributes. If none apply, use null. |
Returns
Type | Description |
---|---|
Task<RuntimeConfig> |
FetchConfigsAsync(Object, Object, Object)
Fetches an app configuration settings from the remote server passing filterAttributes.
Declaration
public async Task<RuntimeConfig> FetchConfigsAsync(object userAttributes, object appAttributes, object filterAttributes)
Parameters
Type | Name | Description |
---|---|---|
Object | userAttributes | A struct containing custom user attributes. If none apply, use null. |
Object | appAttributes | A struct containing custom app attributes. If none apply, use null. |
Object | filterAttributes | A struct containing filter attributes. If none apply, use an empty struct. |
Returns
Type | Description |
---|---|
Task<RuntimeConfig> |
FetchConfigsAsync(String, Object, Object)
Fetches an app configuration settings from the remote server passing a configType.
Declaration
public async Task<RuntimeConfig> FetchConfigsAsync(string configType, object userAttributes, object appAttributes)
Parameters
Type | Name | Description |
---|---|---|
String | configType | A string containing configType. If none apply, use null. |
Object | userAttributes | A struct containing custom user attributes. If none apply, use null. |
Object | appAttributes | A struct containing custom app attributes. If none apply, use null. |
Returns
Type | Description |
---|---|
Task<RuntimeConfig> |
FetchConfigsAsync(String, Object, Object, Object)
Fetches an app configuration settings from the remote server passing a configType.
Declaration
public async Task<RuntimeConfig> FetchConfigsAsync(string configType, object userAttributes, object appAttributes, object filterAttributes)
Parameters
Type | Name | Description |
---|---|---|
String | configType | A string containing configType. If none apply, use null. |
Object | userAttributes | A struct containing custom user attributes. If none apply, use null. |
Object | appAttributes | A struct containing custom app attributes. If none apply, use null. |
Object | filterAttributes | A struct containing filter attributes. If none apply, use an empty struct. |
Returns
Type | Description |
---|---|
Task<RuntimeConfig> |
GetConfig(String)
Retrieves the particular config from multiple config object by passing config type.
Declaration
public RuntimeConfig GetConfig(string configType)
Parameters
Type | Name | Description |
---|---|---|
String | configType | Config type identifier. |
Returns
Type | Description |
---|---|
RuntimeConfig | Corresponding config as a RuntimeConfig. |
LoadFromCache()
Tries to read from cache files (config and headers) and invokes RawResponseReturned action with cached parameters
Declaration
public void LoadFromCache()
SaveCache(ConfigResponse)
Caches all configs previously fetched, called whenever FetchConfigs completes.
Declaration
public void SaveCache(ConfigResponse response)
Parameters
Type | Name | Description |
---|---|---|
ConfigResponse | response | the ConfigResponse resulting from the FetchConfigs call |
SetAnalyticsUserID(String)
Sets analyticsUserId identifier coming from core services.
Declaration
public void SetAnalyticsUserID(string analyticsUserID)
Parameters
Type | Name | Description |
---|---|---|
String | analyticsUserID | analyticsUserId unique identifier. |
SetConfigAssignmentHash(String)
Sets configAssignmentHash identifier.
Declaration
public void SetConfigAssignmentHash(string configAssignmentHashID)
Parameters
Type | Name | Description |
---|---|---|
String | configAssignmentHashID | configAssignmentHash unique identifier. |
SetCustomUserID(String)
Sets a custom user identifier for the Remote Config request payload.
Declaration
public void SetCustomUserID(string customUserID)
Parameters
Type | Name | Description |
---|---|---|
String | customUserID | Custom user identifier. |
SetEnvironmentID(String)
Sets an environment identifier in the Remote Config request payload.
Declaration
public void SetEnvironmentID(string environmentID)
Parameters
Type | Name | Description |
---|---|---|
String | environmentID | Environment unique identifier. |
SetPlayerID(String)
Sets playerId identifier coming from auth services.
Declaration
public void SetPlayerID(string playerID)
Parameters
Type | Name | Description |
---|---|---|
String | playerID | Player Id unique identifier. |
SetPlayerIdentityToken(String)
Sets player Identity Token.
Declaration
public void SetPlayerIdentityToken(string identityToken)
Parameters
Type | Name | Description |
---|---|---|
String | identityToken | Player Identity identifier. |
SetUserID(String)
Sets userId to InstallationID identifier coming from core services.
Declaration
public void SetUserID(string iid)
Parameters
Type | Name | Description |
---|---|---|
String | iid | Installation unique identifier. |