Exemplo n.º 1
0
        public Billing(ILogger logger, FlakyBillingConfiguration configruation)
        {
            _logger        = logger;
            _configuration = configruation;

            var config = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap <TaxRate, Client.TaxRate>();
                cfg.CreateMap <Client.TaxRate, TaxRate>()
                .ConstructUsing((Client.TaxRate taxRate) => new TaxRate(taxRate.Description, taxRate.Rate))
                .ForMember(x => x.TaxCode, opt => opt.Ignore());
                cfg.CreateMap <Client.Transcation, Transcation>();
            });

            config.AssertConfigurationIsValid();

            _mapper = config.CreateMapper();
        }
Exemplo n.º 2
0
 public Billing(FlakyBillingConfiguration configruation) : this(null, configruation)
 {
 }