private void AddBinding()
        {

            kernel.Bind<IProductRepository>().To<EFProductRepository>();

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

            kernel.Bind<IOrderProcessor>().To<EmailOrderProcessor>().WithConstructorArgument("settings", emailSetting);
        }
예제 #2
0
 public EmailOrderProcessor(EmailSettings settings)
 {
     emailSettings = settings;
 }
예제 #3
0
 public EmailOrderProcessor(EmailSettings settings) => emailSettings = settings;
예제 #4
0
 public EmailOrderProcessor(EmailSettings setting)
 {
     emailSetting = setting;
 }