Beispiel #1
0
        public ClaimsCollection MapClaimLatestDevelopmentsToClaimsCollection(
            IEnumerable <ClaimLatestDevelopment> claimLatestDevelopments)
        {
            var claimsCollection = new ClaimsCollection();

            foreach (ClaimLatestDevelopment claimLatestDevelopment in claimLatestDevelopments)
            {
                claimsCollection.Add(this.MapClaimLatestDevelopmentToClaim(claimLatestDevelopment));
            }
            return(claimsCollection);
        }
Beispiel #2
0
        //This should be refactored to a infrastructure class passing as a parameter the "parameter name"

        #region Methods

        private void RefreshClaims(ClaimsCollection claims)
        {
            this.Claims.Clear();
            if (claims == null)
            {
                return;
            }

            foreach (Claim claim in claims)
            {
                this.Claims.Add(claim);
            }
        }
Beispiel #3
0
        public void GetClaimsForCostingAsync(int costingId, Action <IOperationResult <ClaimsCollection> > callback)
        {
            this.ClaimsServiceWS.BeginFindClaimsForCosting(
                costingId,
                (ar) =>
            {
                var operationResult = new OperationResult <ClaimsCollection>();
                try
                {
                    ClaimsCollection claims =
                        this.claimModelDataContractMapper.MapClaimLatestDevelopmentsToClaimsCollection(
                            this.ClaimsServiceWS.EndFindClaimsForCosting(ar));
                    operationResult.Result = claims;
                }
                catch (Exception ex)
                {
                    operationResult.Error = ex;
                }

                this.synchronizationContext.Post((state) => callback(operationResult), null);
            },
                null);
        }