xunit web server collection
This commit is contained in:
parent
282b0277ae
commit
3695c17429
38 changed files with 1033 additions and 140 deletions
|
|
@ -180,7 +180,6 @@ namespace isnd.Services
|
|||
public void ÛpdateCatalogFor(Commit reason = null)
|
||||
{
|
||||
int i = 0;
|
||||
int p = 0;
|
||||
var oldIndex = CurrentCatalogIndex;
|
||||
var oldPages = CurrentCatalogPages;
|
||||
string baseid = extUrl + ApiConfig.Catalog;
|
||||
|
|
@ -344,7 +343,7 @@ namespace isnd.Services
|
|||
return
|
||||
new RegistrationPageIndex(bid, query.Query, extUrl, pkgs);
|
||||
}
|
||||
public RegistrationPageIndex SearchPackage(RegistrationPageIndexQuery query)
|
||||
public async Task<RegistrationPageIndex> SearchPackageAsync(RegistrationPageIndexQuery query)
|
||||
{
|
||||
string bid = $"{extUrl}v3.4.0/{ApiConfig.Registration}";
|
||||
// RegistrationPageIndexAndQuery
|
||||
|
|
@ -353,8 +352,8 @@ namespace isnd.Services
|
|||
.Where(p => p.Id.StartsWith(query.Query, StringComparison.InvariantCultureIgnoreCase)
|
||||
&& (query.Prerelease || p.Versions.Any(v => !v.IsPrerelease)))
|
||||
.Where(p => p.Versions.Count>0);
|
||||
var total = scope.Count();
|
||||
var pkgs = scope.Skip(query.Skip).Take(query.Take).ToArray();
|
||||
var total = await scope.CountAsync();
|
||||
var pkgs = await scope.Skip(query.Skip).Take(query.Take).ToArrayAsync();
|
||||
|
||||
return
|
||||
new RegistrationPageIndex(bid, query.Query, extUrl, pkgs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue