private object BuildModel(NameValueCollection queryString) { var stamp = queryString["stamp"]; var model = new VersionCheckDetails(); var items = new List<VersionCheckDetailsItem>(); if (queryString.AllKeys.Length > 0) { foreach (var token in queryString.AllKeys) { if (!_reservedKeys.ContainsKey(token)) { var item = new VersionCheckDetailsItem { Name = token }; ParseVersion(item, queryString[token]); items.Add(item); } } } model.Packages = items; model.Stamp = stamp; return model; }
public virtual ActionResult Index(VersionCheckDetails details) { var service = PackageSettings.Settings.ExistingReleaseService; var result = service.GetReleaseInfo(details); return View(result); }
public virtual ActionResult Update(VersionCheckDetails details, bool? withDetails) { var service = PackageSettings.Settings.NewReleaseService; var result = service.GetLatestReleaseInfo(details, withDetails ?? false); // Indicates how much data we want to show ViewBag.WithDetails = withDetails; return View(result); }
public virtual ActionResult Update(VersionCheckDetails details, bool? withDetails) { var service = PackageSettings.Settings.ReleaseQueryService; var result = service.GetReleaseInfo(details, true); // Indicates how much data we want to show ViewBag.WithDetails = withDetails; return View(MVC.Version.Install.Views.Update, MVC.Shared.Views._Simple, result); }
public virtual ActionResult Index(VersionCheckDetails details) { if (!HttpContext.Request.Url.Query.Contains("..")) { var service = PackageSettings.Settings.ReleaseQueryService; var result = service.GetReleaseInfo(details, false); return View(MVC.Version.Install.Views.Index, MVC.Shared.Views._Simple, result); } return Update(details, null); }
public ExistingReleaseInfo GetReleaseInfo(VersionCheckDetails request) { var info = new ExistingReleaseInfo { Details = new Dictionary<string, ExistingReleaseDetails>() }; foreach (var package in request.Packages) { var detail = GetReleaseInfo(package); info.Details.Add(package.Name, detail); } return info; }
public LatestReleaseInfo GetLatestReleaseInfo(VersionCheckDetails request, bool includeReleasesData = false) { var info = new LatestReleaseInfo { Details = new Dictionary<string, LatestReleaseDetails>() }; foreach (var package in request.Packages) { var detail = GetLatestReleaseInfo(package, includeReleasesData); info.Details.Add(package.Name, detail); if (detail.HasNewer) info.HasNewer = true; } return info; }
public ReleaseQueryInfo GetReleaseInfo(VersionCheckDetails request, bool includeReleasesData = false) { var info = new ReleaseQueryInfo { Details = new Dictionary <string, ReleaseQueryDetails>() }; foreach (var package in request.Packages) { var detail = GetReleaseInfo(package, includeReleasesData); info.Details.Add(package.Name, detail); if (detail.HasNewer) { info.HasNewer = true; } } return(info); }