public static async Task <ReleaseDescription> GetLatestReleaseDescription()
        {
            String url = "https://raw.githubusercontent.com/shults-s/SmtuSchedule/master/SmtuSchedule.Android/Release.json";

            try
            {
                String json = await HttpHelper.GetAsync(url).ConfigureAwait(false);

                return(ReleaseDescription.FromJson(json));
            }
            catch
            {
                return(null);
            }
        }
Пример #2
0
        public static Task <ReleaseDescription> GetLatestReleaseDescription()
        {
            return(Task.Run(async() =>
            {
                const String Url = RepositoryRawUrl + "SmtuSchedule.Android/Release.json";

                try
                {
                    String json = await HttpUtilities.GetAsync(Url).ConfigureAwait(false);
                    return ReleaseDescription.FromJson(json).Validate();
                }
                catch
                {
                    return null;
                }
            }));
        }