コード例 #1
0
        public Task <IEnumerable <Bug> > GetBugSearchResultsAsync(BugSearchOptions options)
        {
            if (string.IsNullOrWhiteSpace(loginForCurrentUser))
            {
                Console.WriteLine("WARNING: Search result attempted without login. You will not see private search results.");
            }

            return(DoServiceCallAsync(BugSearch, options.ToDictionary()).ContinueWith(t => {
                var result = (JsonObject)t.Result["result"];
                return ((JsonArray)result["bugs"]).Select(bo => Bug.FromJsonObject((JsonObject)bo));
            }));
        }
コード例 #2
0
ファイル: BugzillaClient.cs プロジェクト: bojanrajkovic/libbz
        public Task<IEnumerable<Bug>> GetBugSearchResultsAsync(BugSearchOptions options)
        {
            if (string.IsNullOrWhiteSpace (loginForCurrentUser))
                Console.WriteLine ("WARNING: Search result attempted without login. You will not see private search results.");

            return DoServiceCallAsync (BugSearch, options.ToDictionary()).ContinueWith (t => {
                var result = (JsonObject)t.Result["result"];
                return ((JsonArray)result["bugs"]).Select (bo => Bug.FromJsonObject ((JsonObject)bo));
            }, TaskScheduler.Default);
        }