public static ServerStatus Parse(string text) { ConfigReader configReader = new ConfigReader(text); if (configReader.HasProperty("maintenanceStartTimeUtc")) { try { string @string = configReader.GetString("maintenanceStartTimeUtc"); string string2 = configReader.GetString("maintenanceDuration"); DateTime dateTime = DateTime.Parse(@string); TimeSpan timeSpan = TimeSpan.Parse(string2); return(new ServerStatus(dateTime, timeSpan)); } catch (Exception ex) { Log.Error("Error parsing serverStatus: {text}", (object)ex, 56, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Configuration\\ServerStatus.cs"); return(new ServerStatus(StatusCode.Error)); } } return(new ServerStatus(StatusCode.OK)); }
public static void Read([NotNull] ConfigReader reader) { remoteConfigUrl = RemoteConfig.ReplaceVars(reader.GetUrl("remoteConfigUrl", string.Empty)); initialized = true; }