Esempio n. 1
0
        public void Setup()
        {
            var builder = new ContainerBuilder();

            builder.RegisterType <PaymentTypes.BacsPayment>().As <iBacsPayment>();
            builder.RegisterType <PaymentTypes.FastPayment> ().As <iFastPayment>();
            builder.RegisterType <PaymentTypes.ChapsPayment>().As <IChapsPayment>();
            builder.RegisterType <PaymentService>().As <IPaymentService>();
            var container = builder.Build();

            _backsPayment   = container.Resolve <iBacsPayment>();
            _fastPayment    = container.Resolve <iFastPayment>();
            _chapsPayment   = container.Resolve <IChapsPayment>();
            _paymentService = container.Resolve <IPaymentService>();
        }
Esempio n. 2
0
 public PaymentService(iBacsPayment iBacsPayment, iFastPayment iFastPayment, IChapsPayment iChapsPayment)
 {
     _backs         = iBacsPayment;
     _fasterPayment = iFastPayment;
     _chaps         = iChapsPayment;
 }