示例#1
0
        public static IQueryResult <T> QueryOn <T>(this IQueryable <T> queryable,
                                                   Action <IQueryOption <T> > queryAction)
        {
            var processed = OptionProcessor.Process <IQueryOption <T>, QueryOption <T>, T>(queryAction, queryable);

            return(ResultProcessor.Process(processed));
        }
示例#2
0
        public async Task <IEnumerable <NugetListingQuery> > Query(FilePath projectPath, bool outdated, bool includePrerelease, CancellationToken cancel)
        {
            var result = await ProcessRunner.RunAndCapture(
                NetCommandStartConstructor.Construct("list",
                                                     projectPath,
                                                     "package",
                                                     outdated ? "--outdated" : null,
                                                     includePrerelease ? "--include-prerelease" : null),
                cancel : cancel).ConfigureAwait(false);

            if (result.Errors.Count > 0)
            {
                throw new InvalidOperationException($"Error while retrieving nuget listings: \n{string.Join("\n", result.Errors)}");
            }

            return(ResultProcessor.Process(result.Out));
        }