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); }
public EmailOrderProcessor(EmailSettings settings) { emailSettings = settings; }
public EmailOrderProcessor(EmailSettings settings) => emailSettings = settings;
public EmailOrderProcessor(EmailSettings setting) { emailSetting = setting; }