public static WriteResponseAsync ( IOwinContext context, |
||
context | IOwinContext | |
e | ||
return | System.Threading.Tasks.Task |
public static async Task Stats(IOwinContext context, NuGetSearcherManager searcherManager) { await ResponseHelpers.WriteResponseAsync( context, HttpStatusCode.OK, jsonWriter => ServiceInfoImpl.Stats(jsonWriter, searcherManager)); }
public static async Task FindAsync(IOwinContext context, NuGetSearcherManager searcherManager) { var id = context.Request.Query["id"] ?? string.Empty; var scheme = context.Request.Uri.Scheme; await ResponseHelpers.WriteResponseAsync( context, HttpStatusCode.OK, jsonWriter => ServiceImpl.Find(jsonWriter, searcherManager, id, scheme)); }
public static async Task V3SearchAsync(IOwinContext context, NuGetSearcherManager searcherManager) { var skip = GetSkip(context); var take = GetTake(context); var includePrerelease = GetIncludePrerelease(context); var includeExplanation = GetIncludeExplanation(context); var q = context.Request.Query["q"] ?? string.Empty; var feed = context.Request.Query["feed"]; var scheme = context.Request.Uri.Scheme; await ResponseHelpers.WriteResponseAsync( context, HttpStatusCode.OK, jsonWriter => ServiceImpl.Search(jsonWriter, searcherManager, scheme, q, includePrerelease, skip, take, feed, includeExplanation)); }
public static async Task V2SearchAsync(IOwinContext context, NuGetSearcherManager searcherManager) { var skip = GetSkip(context); var take = GetTake(context); var ignoreFilter = GetIgnoreFilter(context); var countOnly = GetCountOnly(context); var includePrerelease = GetIncludePrerelease(context); var q = context.Request.Query["q"] ?? string.Empty; var sortBy = context.Request.Query["sortBy"] ?? string.Empty; var feed = context.Request.Query["feed"]; await ResponseHelpers.WriteResponseAsync( context, HttpStatusCode.OK, jsonWriter => GalleryServiceImpl.Search(jsonWriter, searcherManager, q, countOnly, includePrerelease, sortBy, skip, take, feed, ignoreFilter)); }
public static async Task AutoCompleteAsync(IOwinContext context, NuGetSearcherManager searcherManager) { var skip = GetSkip(context); var take = GetTake(context); var includePrerelease = GetIncludePrerelease(context); var includeExplanation = GetIncludeExplanation(context); var q = context.Request.Query["q"]; var id = context.Request.Query["id"]; if (q == null && id == null) { q = string.Empty; } await ResponseHelpers.WriteResponseAsync( context, HttpStatusCode.OK, jsonWriter => ServiceImpl.AutoComplete(jsonWriter, searcherManager, q, id, includePrerelease, skip, take, includeExplanation)); }