public void RegisterDependencies(IDependencyRegistry dependencyRegistry) { var configuration = new Configuration(); dependencyRegistry.RegisterCreator<IConfiguration>(() => configuration); dependencyRegistry.RegisterBinding<IHttpRequestExecutor, HttpRequestExecutor>(); dependencyRegistry.RegisterBinding<IBuildExecutor, BuildExecutor>(); dependencyRegistry.RegisterBinding<IMaintenanceTarballCreator, MaintenanceTarballCreator>(); }
public void RegisterDependencies(IDependencyRegistry dependencyRegistry) { dependencyRegistry.RegisterCreator<ICaptchaGenerator>(() => { if (HttpContext.Current.Request.RawUrl.Contains("WithBypass")) return new BypassCaptchaGenerator(); return new ReCaptchaGenerator(); }); dependencyRegistry.RegisterCreator<ICaptchaValidator>(() => { if (HttpContext.Current.Request.RawUrl.Contains("WithBypass")) return new BypassCaptchaValidator(); return new ReCaptchaValidator(); }); }
public void RegisterDependencies(IDependencyRegistry dependencyRegistry) { dependencyRegistry.RegisterCreator <ICaptchaGenerator>(() => { if (HttpContext.Current.Request.RawUrl.Contains("WithBypass")) { return(new BypassCaptchaGenerator()); } return(new ReCaptchaGenerator()); }); dependencyRegistry.RegisterCreator <ICaptchaValidator>(() => { if (HttpContext.Current.Request.RawUrl.Contains("WithBypass")) { return(new BypassCaptchaValidator()); } return(new ReCaptchaValidator()); }); }
public void RegisterDependencies(IDependencyRegistry dependencyRegistry) { dependencyRegistry.RegisterCreator <IMailSender>(() => { var mailSenderConfiguration = new MailSenderConfiguration { DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory, PickupDirectoryLocation = HttpContext.Current.Server.MapPath("~/App_Data/Mail") }; //var mailSenderConfiguration = new MailSenderConfiguration() { // DeliveryMethod = SmtpDeliveryMethod.Network, // EnableSsl = true, // Host = "smtp.gmail.com", // Port = 587, // UseDefaultCredentials = false, // Credentials = new NetworkCredential("<your-gmail-address>", "<your-gmail-password>") //}; return(new MarkdownSharpMailSender(mailSenderConfiguration)); }); }
public void RegisterDependencies(IDependencyRegistry dependencyRegistry) { dependencyRegistry.RegisterCreator<IMailSender>(() => { var mailSenderConfiguration = new MailSenderConfiguration { DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory, PickupDirectoryLocation = HttpContext.Current.Server.MapPath("~/App_Data/Mail") }; //var mailSenderConfiguration = new MailSenderConfiguration() { // DeliveryMethod = SmtpDeliveryMethod.Network, // EnableSsl = true, // Host = "smtp.gmail.com", // Port = 587, // UseDefaultCredentials = false, // Credentials = new NetworkCredential("<your-gmail-address>", "<your-gmail-password>") //}; return new MailSender(mailSenderConfiguration); }); }
public void RegisterDependencies(IDependencyRegistry dependencyRegistry) { dependencyRegistry.RegisterCreator <IMailSender>(() => mailSenderThunk.Value); }
public void RegisterDependencies(IDependencyRegistry dependencyRegistry) { dependencyRegistry.RegisterCreator<IMailSender>(() => mailSenderThunk.Value); }
public void RegisterDependencies(IDependencyRegistry dependencyRegistry) { dependencyRegistry.RegisterCreator<IGreetingService>( "greetingService", () => new GreetingService()); }