private void AddBindings()
        {
            kernel.Bind<IProductRepository>().To<EFProductRepository>();

            EmailSettings emailSettings = new EmailSettings
            {
                WriteAsFile = bool.Parse(ConfigurationManager.AppSettings["Email.WriteAsFile"] ?? "false")
            };

            kernel.Bind<IOrderProcessor>().To<EmailOrderProcessor>().WithConstructorArgument("settings", emailSettings);

            kernel.Bind<IAuthProvider>().To<FormsAuthProvider>();
        }
        private void AddBindings()
        {  
            //connect with database on local PC
            _kernel.Bind<IGameRepository>().To<GameDbRepository>();
            _kernel.Bind<IAuthProvider>().To<FormAuthProvider>();

            EmailSettings emailSettings = new EmailSettings
            {
                WriteAsFile = bool.Parse(ConfigurationManager
                .AppSettings["Email.WriteAsFile"] ?? "false")
            };

            _kernel.Bind<IOrderProcessor>().To<EmailOrderProcessor>()
                .WithConstructorArgument("settings", emailSettings);
        }
 public EmailOrderProcessor(EmailSettings settings)
 {
     this._emailSettings = settings;
 }
Esempio n. 4
0
 public EmailOrderProcessor(EmailSettings settings)
 {
     emailSettings = settings;
 }
Esempio n. 5
0
 public EmailOrderProcessor(EmailSettings emailSettings)
 {
     this.emailSettings = emailSettings;
 }