Пример #1
0
        public Offer GetOffer(int id)
        {
            log.Trace($"Getting offer {id}");
            var offer = Offers.FirstOrDefault(e => e.Id == id);

            return(offer == null?OutgoingOffers.FirstOrDefault(e => e.Id == id) : offer);
        }
Пример #2
0
        private Offer GetActiveOffer()
        {
            log.Trace("Getting active offer");
            var offer = Offers.FirstOrDefault(o => o.TradeRequestSent);

            return(offer == null?OutgoingOffers.FirstOrDefault(o => o.TradeRequestSent) : offer);
        }
Пример #3
0
        private void OfferDeleted(int vmId)
        {
            var foundTicketOfferViewModel =
                Offers.FirstOrDefault(ticketOfferViewModel => ticketOfferViewModel.VmId == vmId);

            InvokeOnMainThread(() => Offers.Remove(foundTicketOfferViewModel));
        }