public TicketListRequest GetRequest()
        {
            var list = new TicketListRequest();
            var ticketIsOpenCriterion = new Criterion {
                ElementName = ElementName.Ticket,
                Test        = new PredicateAndValue {
                    PredicateText = PredicateName.Is,
                    Value         = new ConstantValue {
                        Text = WellKnownValue.Open
                    },
                },
            };

            list.SearchModel.CriteriaRoot.Criteria.Add(ticketIsOpenCriterion);
            return(list);
        }
Esempio n. 2
0
        public IReadOnlyList <Ticket> GetTickets(TicketListRequest request)
        {
            var specificationProvider = specificationProviderFactory(request?.SearchModel);

            return(GetTickets(specificationProvider));
        }