update: add custom guru-service key
parent
6275afac9b
commit
d17a6e2eae
|
|
@ -24,6 +24,10 @@ namespace Guru
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool AutoRecordFinishedLevels = true;
|
public bool AutoRecordFinishedLevels = true;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 自定义 Service 云控 Key
|
||||||
|
/// </summary>
|
||||||
|
public string CustomServiceKey = "";
|
||||||
|
/// <summary>
|
||||||
/// Debug模式(默认关闭)
|
/// Debug模式(默认关闭)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DebugMode = false;
|
public bool DebugMode = false;
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,9 @@ namespace Guru
|
||||||
|
|
||||||
#region App Remote Update
|
#region App Remote Update
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Apply Cloud guru-service configs for sdk assets
|
||||||
|
/// </summary>
|
||||||
private void SetupServicesConfig()
|
private void SetupServicesConfig()
|
||||||
{
|
{
|
||||||
bool useKeywords = false;
|
bool useKeywords = false;
|
||||||
|
|
@ -334,9 +337,19 @@ namespace Guru
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the guru-service cloud config value;
|
||||||
|
/// User can fetch the cloud guru-service config by using Custom Service Key
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
private GuruServicesConfig GetRemoteServicesConfig()
|
private GuruServicesConfig GetRemoteServicesConfig()
|
||||||
{
|
{
|
||||||
var json = GetRemoteString(ServicesConfigKey);
|
string key = ServicesConfigKey;
|
||||||
|
if (!string.IsNullOrEmpty(_initConfig.CustomServiceKey))
|
||||||
|
{
|
||||||
|
key = _initConfig.CustomServiceKey;
|
||||||
|
}
|
||||||
|
var json = GetRemoteString(key);
|
||||||
if (!string.IsNullOrEmpty(json))
|
if (!string.IsNullOrEmpty(json))
|
||||||
{
|
{
|
||||||
return JsonParser.ToObject<GuruServicesConfig>(json);
|
return JsonParser.ToObject<GuruServicesConfig>(json);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue