Ejemplo n.º 1
0
        private Task <Tuple <List <Bill>, bool, int, string> > GetAllBillsTasks()
        {
            var getBillsTask = new Task <Tuple <List <Bill>, bool, int, string> >((prms) =>
            {
                var passedParams = (prms as Tuple <string, BillManager, int, int>);

                var legislatorId     = passedParams.Item1;
                var bm               = new BillManager(new Logger(Class.SimpleName));
                var localCurrentPage = passedParams.Item3;
                var mode             = (BillViewerKind)((int)passedParams.Item4);

                var results = bm.GetBillsIntroduced(localCurrentPage);

                var isThereMoreVotes = results.IsThereMoreResults;

                return(new Tuple <List <Bill>, bool, int, string>(results.Results, isThereMoreVotes, localCurrentPage, string.Empty));
            }, new Tuple <string, BillManager, int, int>("search term goes here", _billManager, currentPage, (int)_viewerMode));

            return(getBillsTask);
        }