Exemple #1
0
        private static DbProviderFactory GetFactory(
            ILogRepositoryConfiguration logRepositoryConfiguration)
        {
            if (logRepositoryConfiguration == null)
            {
                throw new ArgumentNullException("logRepositoryConfiguration");
            }

            return logRepositoryConfiguration.Factory;
        }
Exemple #2
0
 /// <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))
 {
 }
Exemple #3
0
        private static string GetConnectionString(
            ILogRepositoryConfiguration logRepositoryConfiguration)
        {
            if (logRepositoryConfiguration == null)
            {
                throw new ArgumentNullException("logRepositoryConfiguration");
            }

            return logRepositoryConfiguration.ConnectionString;
        }