示例#1
0
        protected override void RegisterServices(IKernel kernel)
        {
            kernel.Rebind <CartModel>().ToMethod(context => context.Kernel.Get <ICartBuilder>().BuildCart()).InRequestScope();
            kernel.Rebind <SECVPN>().ToMethod(context =>
            {
                var service = new SECVPNClient(new BasicHttpBinding(BasicHttpSecurityMode.Transport),
                                               new EndpointAddress("https://www.secpay.com/java-bin/services/SECCardService"));

                return(service);
            });
        }
示例#2
0
        protected override void RegisterServices(IKernel kernel)
        {
            kernel.Rebind<CartModel>().ToMethod(context => context.Kernel.Get<ICartBuilder>().BuildCart()).InRequestScope();
            kernel.Rebind<SECVPN>().ToMethod(context =>
            {
                var service = new SECVPNClient(new BasicHttpBinding(BasicHttpSecurityMode.Transport),
                    new EndpointAddress("https://www.secpay.com/java-bin/services/SECCardService"));

                return service;
            });
        }