/// <summary> /// Opens the CDNs, Versions from Ribbit and the config files from Blizzard's CDN /// </summary> public void OpenRemote() { var ribbit = new RibbitClient(Locale); using var cdnstream = ribbit.GetStream(RibbitCommand.CDNs, Product).Result; using var verstream = ribbit.GetStream(RibbitCommand.Versions, Product).Result; CDNsFile = new VariableConfig(cdnstream, ConfigType.CDNs); VersionsFile = new VariableConfig(verstream, ConfigType.Versions); }
/// <summary> /// Opens the CDNs and Versions files from Ribbit and the config files from disk /// </summary> public void OpenRemote(string directory) { var ribbit = new RibbitClient(Locale); using (var cdnstream = ribbit.GetStream(RibbitCommand.CDNs, Product).Result) using (var verstream = ribbit.GetStream(RibbitCommand.Versions, Product).Result) { CDNsFile = new VariableConfig(cdnstream, ConfigType.CDNs); VersionsFile = new VariableConfig(verstream, ConfigType.Versions); } LoadConfigs(directory); }
/// <summary> /// Opens the CDNs, Versions from Ribbit and the config files from Blizzard's CDN /// </summary> public void OpenRemote() { var ribbit = new RibbitClient(Locale); using (var cdnstream = ribbit.GetStream(RibbitCommand.CDNs, Product).Result) using (var verstream = ribbit.GetStream(RibbitCommand.Versions, Product).Result) { CDNsFile = new VariableConfig(cdnstream, ConfigType.CDNs); VersionsFile = new VariableConfig(verstream, ConfigType.Versions); if (!VersionsFile.HasLocale(Locale)) { throw new Exception($"Versions missing {Locale} locale"); } var cdnClient = new CDNClient(this); if (BuildConfigMD5.Value != null) { string configUrl = Helpers.GetCDNUrl(BuildConfigMD5.ToString(), "config"); BuildConfig = new KeyValueConfig(cdnClient.OpenStream(configUrl).Result, ConfigType.BuildConfig); } if (CDNConfigMD5.Value != null) { string configUrl = Helpers.GetCDNUrl(CDNConfigMD5.ToString(), "config"); CDNConfig = new KeyValueConfig(cdnClient.OpenStream(configUrl).Result, ConfigType.CDNConfig); } if (PatchConfigMD5.Value != null) { string configUrl = Helpers.GetCDNUrl(PatchConfigMD5.ToString(), "config"); PatchConfig = new KeyValueConfig(cdnClient.OpenStream(configUrl).Result, ConfigType.PatchConfig); } } }