private static DbProviderFactory GetFactory( ILogRepositoryConfiguration logRepositoryConfiguration) { if (logRepositoryConfiguration == null) { throw new ArgumentNullException("logRepositoryConfiguration"); } return logRepositoryConfiguration.Factory; }
/// <summary> /// Initializes a new instance of the <see cref="LogRepository"/> class. /// </summary> /// <param name="logRepositoryConfiguration">The log repository configuration.</param> public LogRepository(ILogRepositoryConfiguration logRepositoryConfiguration) : base(GetFactory(logRepositoryConfiguration), GetConnectionString(logRepositoryConfiguration)) { }
private static string GetConnectionString( ILogRepositoryConfiguration logRepositoryConfiguration) { if (logRepositoryConfiguration == null) { throw new ArgumentNullException("logRepositoryConfiguration"); } return logRepositoryConfiguration.ConnectionString; }