public async Task <IList <AvailableVersion> > CheckForUpdatesAsync(UpdateRequest request, IComparer <Version> versionComparer) { var parameters = new ServiceParameterCollection { { "cid", Uri.EscapeDataString(request.ClientIdentifier?.ToString() ?? "") }, { "pid", Uri.EscapeDataString(request.ApplicationIdentifier ?? "") }, { "ver", Uri.EscapeDataString(MakeFourDigitVersionNumber(request.CurrentVersionInUse)) }, // Mono's Version.ToString(4) skips zeros anyway { "vai", Uri.EscapeDataString(request.Channel ?? "") }, { "ext", Uri.EscapeDataString(request.PlatformIdentifier?.ToString() ?? "") }, { "vol", Uri.EscapeDataString(request.FreeText ?? "") } }; var versions = await PutAsync(parameters.ToString()); return(versions .Where(v => versionComparer.Compare(v.Version, request.CurrentVersionInUse) > 0) .OrderByDescending(v => v.Version, versionComparer) .ToList()); }
internal Task <IList <AvailableVersion> > CallWebserviceAsync(string method, ServiceParameterCollection parameters) { return(CallWebServiceAsync(method, parameters.ToString())); }
internal Task <IList <AvailableVersion> > GetAsync(string table, string where) { var parameters = new ServiceParameterCollection("table", table).Add("where", where); return(CallWebserviceAsync("GetData", parameters)); }