/// <summary>
        /// 
        /// </summary>
        /// 
        /// <param name="source"></param>
        /// 
        /// <returns></returns>
        /// 
        public static ExchangeResponse Assign(ExchangeDisposition source)
        {
            ExchangeResponse result = new ExchangeResponse();

            result.Status = source.Status;

            result.Guid = source.Guid;
            result.Aid = source.Aid;
            result.Cid = source.Cid;
            result.Tid = source.Tid;

            result.MatchCount = source.MatchCount;
            result.Amount = source.Amount;
            result.Errors = source.Errors.ToArray();

            return result;
        }
Exemplo n.º 2
0
        /// <summary>
        /// 
        /// </summary>
        /// 
        /// <param name="lead"></param>
        /// 
        /// <returns></returns>
        /// 
        public static ExchangeResponse SecurityViolation(LeadType lead)
        {
            ExchangeResponse response = new ExchangeResponse();
            response.aid = lead.Aid;
            response.amount = 0;
            response.cid = lead.Cid;
            response.guid = lead.Guid;
            response.matchcount = 0;
            response.status = SECURITY;
            response.tid = lead.Tid;

            List<Error> errors = new List<Error>();
            errors.Add(new Error(ExchangeValidator.Credentials, ExchangeValidator.credentialsErrorDesc));
            response.errors = errors;
            return response;
        }