From e33e8825f30544630f5534a964a4185fdc8b8646 Mon Sep 17 00:00:00 2001 From: Aptivi CEO Date: Sun, 10 Dec 2023 13:56:21 +0300 Subject: [PATCH] doc - Added missing documentation --- We've added missing code documentation for the Forecast class. --- Type: doc Breaking: False Doc Required: False Part: 1/1 --- ManagedWeatherMap/Forecast.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ManagedWeatherMap/Forecast.cs b/ManagedWeatherMap/Forecast.cs index afcef79..4070a85 100644 --- a/ManagedWeatherMap/Forecast.cs +++ b/ManagedWeatherMap/Forecast.cs @@ -33,7 +33,10 @@ namespace ManagedWeatherMap.Core { - public static partial class Forecast + /// + /// The forecast tools + /// + public static class Forecast { internal static HttpClient WeatherDownloader = new(); @@ -42,6 +45,7 @@ public static partial class Forecast /// /// City ID /// API key + /// The preferred unit to use /// A class containing properties of weather information public static ForecastInfo GetWeatherInfo(long CityID, string APIKey, UnitMeasurement Unit = UnitMeasurement.Metric) { @@ -54,6 +58,7 @@ public static ForecastInfo GetWeatherInfo(long CityID, string APIKey, UnitMeasur /// /// City name /// API Key + /// The preferred unit to use /// A class containing properties of weather information public static ForecastInfo GetWeatherInfo(string CityName, string APIKey, UnitMeasurement Unit = UnitMeasurement.Metric) { @@ -65,6 +70,7 @@ public static ForecastInfo GetWeatherInfo(string CityName, string APIKey, UnitMe /// Gets current weather info from OpenWeatherMap /// /// An URL to the weather API request + /// The preferred unit to use /// A class containing properties of weather information internal static ForecastInfo GetWeatherInfo(string WeatherURL, UnitMeasurement Unit = UnitMeasurement.Metric) { @@ -89,6 +95,7 @@ internal static ForecastInfo GetWeatherInfo(string WeatherURL, UnitMeasurement U /// /// City ID /// API key + /// The preferred unit to use /// A class containing properties of weather information public static async Task GetWeatherInfoAsync(long CityID, string APIKey, UnitMeasurement Unit = UnitMeasurement.Metric) { @@ -101,6 +108,7 @@ public static async Task GetWeatherInfoAsync(long CityID, string A /// /// City name /// API Key + /// The preferred unit to use /// A class containing properties of weather information public static async Task GetWeatherInfoAsync(string CityName, string APIKey, UnitMeasurement Unit = UnitMeasurement.Metric) { @@ -112,6 +120,7 @@ public static async Task GetWeatherInfoAsync(string CityName, stri /// Gets current weather info from OpenWeatherMap /// /// An URL to the weather API request + /// The preferred unit to use /// A class containing properties of weather information internal static async Task GetWeatherInfoAsync(string WeatherURL, UnitMeasurement Unit = UnitMeasurement.Metric) { @@ -196,7 +205,7 @@ internal static Dictionary FinalizeCityList(Stream WeatherCityList WeatherCityListUncompressed.Add((byte)WeatherCityListReadByte); } - WeatherCityListToken = JToken.Parse(Encoding.Default.GetString(WeatherCityListUncompressed.ToArray())); + WeatherCityListToken = JToken.Parse(Encoding.Default.GetString([.. WeatherCityListUncompressed])); // Put needed data to the class foreach (JToken WeatherCityToken in WeatherCityListToken)