/// <summary> /// Retrieves a collection of locales available to download the help for /// </summary> /// <returns> /// Collection of Locales available /// </returns> /// <exception cref="WebException"> /// If the data cannot be downloaded /// </exception> /// <exception cref="XmlException"> /// If the data cannot be processed /// </exception> /// <exception cref="InvalidOperationException"> /// If the data cannot be processed /// </exception> public ICollection <Locale> LoadAvailableLocales(string vsVersion) { string catalogPath = string.Format("catalogs/{0}", vsVersion); Debug.Print("Downloading locales list from {0}{1}", client.BaseAddress, catalogPath); return(HelpIndexManager.LoadLocales(client.DownloadData(catalogPath))); }
/// <summary> /// Retrieves a collection of locales available to download the help for /// </summary> /// <returns> /// Collection of Locales available /// </returns> /// <exception cref="WebException"> /// If the data cannot be downloaded /// </exception> /// <exception cref="XmlException"> /// If the data cannot be processed /// </exception> /// <exception cref="InvalidOperationException"> /// If the data cannot be processed /// </exception> public async Task <ICollection <Locale> > LoadAvailableLocalesAsync(string vsVersion) { string catalogPath = string.Format("catalogs/{0}", vsVersion); Debug.Print("Downloading locales list from {0}{1}", client.BaseAddress, catalogPath); ICollection <Locale> locales = HelpIndexManager.LoadLocales(await client.DownloadDataTaskAsync(catalogPath)); return(locales); }
/// <summary> /// Retrieves a collection of locales available to download the help for /// </summary> /// <returns> /// Collection of Locales available /// </returns> /// <exception cref="WebException"> /// If the data cannot be downloaded /// </exception> /// <exception cref="XmlException"> /// If the data cannot be processed /// </exception> /// <exception cref="InvalidOperationException"> /// If the data cannot be processed /// </exception> public ICollection <Locale> LoadAvailableLocales(string vsVersion) { string catalogPath = string.Format("catalogs/{0}", vsVersion); Debug.Print("Downloading locales list from {0}{1}", client.BaseAddress, catalogPath); ICollection <Locale> locales = HelpIndexManager.LoadLocales(client.DownloadData(catalogPath)); foreach (Locale l in locales) { l.CatalogLink = l.CatalogLink.Replace("dev14", "dev15"); } return(locales); }
/// <summary> /// Retrieves a collection of locales available to download the help for /// </summary> /// <returns> /// Collection of Locales available /// </returns> /// <exception cref="WebException"> /// If the data cannot be downloaded /// </exception> /// <exception cref="XmlException"> /// If the data cannot be processed /// </exception> /// <exception cref="InvalidOperationException"> /// If the data cannot be processed /// </exception> public ICollection <Locale> LoadAvailableLocales(string vsVersion) { // FIXME: Locales are not currently present for VS2017 if (vsVersion.Equals("dev15", StringComparison.OrdinalIgnoreCase)) { vsVersion = "dev14"; } string catalogPath = string.Format("catalogs/{0}", vsVersion); Debug.Print("Downloading locales list from {0}{1}", client.BaseAddress, catalogPath); ICollection <Locale> locales = HelpIndexManager.LoadLocales(client.DownloadData(catalogPath)); // FIXME: The path for the locales is pointing VS2015 docs due the fix above, fix them to point to VS2017 foreach (Locale l in locales) { l.CatalogLink = l.CatalogLink.Replace("dev14", "dev15"); } return(locales); }