private void AddBindings()
        {
            kernel.Bind<ITourRepository>().To<EFTourRepository>();

            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>();
        }
Esempio n. 2
0
 public EmailOrderProcessor(EmailSettings settings)
 {
     emailSettings = settings;
 }