Esempio n. 1
0
        public bool ClaimDequeue(ClaimsContent content)
        {
            int startingCount = _queueOfClaimsRepo.Count;

            _queueOfClaimsRepo.Dequeue();
            bool wasDequeued = (_queueOfClaimsRepo.Count < startingCount) ? true : false;

            return(wasDequeued);
        }
Esempio n. 2
0
        //create
        public bool AddClaimToQueue(ClaimsContent content)
        {
            int startingCount = _queueOfClaimsRepo.Count;

            _queueOfClaimsRepo.Enqueue(content);
            bool wasAdded = (_queueOfClaimsRepo.Count > startingCount) ? true : false;

            return(wasAdded);
        }
Esempio n. 3
0
        public ClaimsContent NextClaim()
        {
            ClaimsContent claim = _queueOfClaimsRepo.Peek();

            Console.WriteLine($"Claims ID{claim.ClaimsID} \n" +
                              $"Description:{claim.Description}\n" +
                              $"Amount:{claim.ClaimAmount}\n" +
                              $"Date of accident:{claim.DateOfClaim}\n" +
                              $"Date of claim: {claim.DateOfClaim}\n");
            if (claim.IsValid)
            {
                Console.WriteLine("Valid");
            }
            else
            {
                Console.WriteLine("Invallid");
            }
            return(claim);
        }