search view fixed
This commit is contained in:
parent
58f77a06ea
commit
95600facf4
10 changed files with 45 additions and 67 deletions
|
|
@ -13,10 +13,11 @@ namespace isnd.Data.Catalog
|
|||
[JsonRequired]
|
||||
public string Id { get; protected set;}
|
||||
|
||||
private string pkgid;
|
||||
private List<PackageVersion> items;
|
||||
|
||||
protected string Bid { get ; private set; }
|
||||
public string DlBase { get; }
|
||||
protected string DlBase { get; }
|
||||
|
||||
public RegistrationPage (string bid, string dlBase)
|
||||
{
|
||||
|
|
@ -31,13 +32,14 @@ namespace isnd.Data.Catalog
|
|||
Parent = Bid + "/index.json";
|
||||
DlBase = dlBase;
|
||||
this.items = new List<PackageVersion>(items);
|
||||
SetPackageId(pkgid);
|
||||
this.Id = Bid + "/" + pkgid + "/index.json";
|
||||
this.pkgid = pkgid;
|
||||
UpdateCompact();
|
||||
}
|
||||
|
||||
protected void SetPackageId(string pkgid)
|
||||
public string GetPackageId()
|
||||
{
|
||||
this.Id = Bid + "/" + pkgid + "/index.json";
|
||||
return pkgid;
|
||||
}
|
||||
|
||||
private void UpdateCompact()
|
||||
|
|
|
|||
|
|
@ -14,13 +14,12 @@ namespace isnd.Data.Catalog
|
|||
[JsonProperty("@id")]
|
||||
public string Id { get; protected set; }
|
||||
|
||||
public RegistrationPageIndex(string bid, string id)
|
||||
public RegistrationPageIndex()
|
||||
{
|
||||
Id = bid + "/" + id + "/index.json";
|
||||
Items = new List<RegistrationPage>();
|
||||
}
|
||||
|
||||
public RegistrationPageIndex(string bid, string id, string dlBase, IEnumerable<Package> pkgs) : this(bid, id)
|
||||
public RegistrationPageIndex(string bid, string id, string dlBase, IEnumerable<Package> pkgs)
|
||||
{
|
||||
// leaves;
|
||||
this.Items = new List<RegistrationPage>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ namespace isnd.Data.Catalog
|
|||
{
|
||||
public class RegistrationPageIndexQuery
|
||||
{
|
||||
|
||||
public RegistrationPageIndexQuery()
|
||||
{
|
||||
}
|
||||
|
|
@ -22,7 +21,5 @@ namespace isnd.Data.Catalog
|
|||
[JsonProperty("take")]
|
||||
|
||||
public int Take { get; set; } = 25;
|
||||
[JsonProperty("totalHits")]
|
||||
public int TotalHits { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -51,14 +51,14 @@ namespace isnd.Data.Packages
|
|||
/// </summary>
|
||||
/// <param name="bid">base url tu use for building the id property</param>
|
||||
/// <returns></returns>
|
||||
public RegistrationLeaf ToLeave(string bid)
|
||||
public RegistrationLeaf ToLeave(string bid, string dlbase)
|
||||
{
|
||||
if (Versions.Count == 0) throw new Exception("NO VERSION");
|
||||
var v = Versions.OrderBy(w => w.NugetVersion).First();
|
||||
RegistrationLeaf leave = new RegistrationLeaf
|
||||
{
|
||||
Id = bid + Id + "/" + v.FullString + ".json",
|
||||
PackageContent = v.NugetLink,
|
||||
PackageContent = dlbase + "/" + v.NugetLink,
|
||||
Entry = new CatalogEntry
|
||||
{
|
||||
Id = bid + Id + ".json",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue