예제 #1
0
        public DatabaseDeleter(Func <IConnectionStringProvider, IGetsDatabaseFilePath> connectionStringAdapterFactory,
                               IConnectionStringProvider connectionStringProvider,
                               ILog logger)
        {
            if (connectionStringAdapterFactory == null)
            {
                throw new ArgumentNullException(nameof(connectionStringAdapterFactory));
            }
            if (connectionStringProvider == null)
            {
                throw new ArgumentNullException(nameof(connectionStringProvider));
            }

            connectionStringAdapter = connectionStringAdapterFactory(connectionStringProvider);
            this.logger             = logger ?? throw new ArgumentNullException(nameof(logger));
        }
예제 #2
0
 public DatabaseFileProvider(Func <IConnectionStringProvider, IGetsDatabaseFilePath> connectionStringAdapterFactory,
                             IConnectionStringProvider connectionStringProvider)
 {
     connectionStringAdapter = connectionStringAdapterFactory(connectionStringProvider);
 }