public void RegisterServices(IOneAppKernel kernel) { var dataSource = AuthenticationConfigurationKeys.AuthenticationDataSource; switch (dataSource) { case Model.AuthenticationDataSource.Mock: kernel.BindConcerteToAbstact <IAuthenticationRepository, MockAuthenticationRepository>(); break; case Model.AuthenticationDataSource.SqlServer: kernel.BindConcerteToAbstact <IAuthenticationRepository, EFAuthenticationRepository>(); break; case Model.AuthenticationDataSource.MongoDb: kernel.BindConcerteToAbstact <IAuthenticationRepository, MongoAuthenticationRepository>(); break; case Model.AuthenticationDataSource.LDAP: kernel.BindConcerteToAbstact <IAuthenticationRepository, LdapAuthenticationRepository>(); break; default: throw new NotImplementedException(dataSource.ToString()); } }
public void RegisterServices(IOneAppKernel kernel) { var emailchannel = OneAppConfigurationKeys.Emailchannel; switch (emailchannel) { case Emailchannel.Mock: kernel.BindConcerteToAbstact <IEmailSender, EmailMockSender>(); break; default: kernel.BindConcerteToAbstact <IEmailSender, EmailLiveSender>(); break; } }
public void RegisterServices(IOneAppKernel kernel) { var dataSource = OneAppConfigurationKeys.AppDataSource; switch (dataSource) { case AppDataSource.Mock: kernel.BindConcerteToAbstact <IStylesRepository, StylesMockRepository>(); break; case AppDataSource.SqlServer: kernel.BindConcerteToAbstact <IStylesRepository, StylesEFRepository>(); break; default: throw new NotImplementedException(dataSource.ToString()); } }