コード例 #1
0
        public LogRepository(
            SqliteConnectionstringResolver connectionStringResolver)
        {
            if (connectionStringResolver == null) { throw new ArgumentNullException(nameof(connectionStringResolver)); }
            //if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); }

            //logFactory = loggerFactory;
            //log = loggerFactory.CreateLogger(typeof(GeoRepository).FullName);
            connectionString = connectionStringResolver.Resolve();

            dbSystemLog = new DBSystemLog(connectionString);

        }
コード例 #2
0
ファイル: Db.cs プロジェクト: wintorojati/cloudscribe
        public Db(
            SqliteConnectionstringResolver connectionStringResolver,
            ILogger<SqliteConnectionstringResolver> logger,
            IVersionProviderFactory versionProviderFactory)
        {
            if (connectionStringResolver == null) { throw new ArgumentNullException(nameof(connectionStringResolver)); }
            if (logger == null) { throw new ArgumentNullException(nameof(logger)); }
            if (versionProviderFactory == null) { throw new ArgumentNullException(nameof(versionProviderFactory)); }

            versionProviders = versionProviderFactory;
            log = logger;
            connectionString = connectionStringResolver.Resolve();
            sqliteFilePath = connectionStringResolver.SqliteFilePath;

        }
コード例 #3
0
ファイル: SiteRepository.cs プロジェクト: ludev/cloudscribe
        public SiteRepository(
            SqliteConnectionstringResolver connectionStringResolver,
            ILoggerFactory loggerFactory)
        {
            if (connectionStringResolver == null) { throw new ArgumentNullException(nameof(connectionStringResolver)); }
            if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); }

            logFactory = loggerFactory;
            log = loggerFactory.CreateLogger(typeof(SiteRepository).FullName);

            connectionString = connectionStringResolver.Resolve();

            dbSiteSettings = new DBSiteSettings(connectionString, logFactory);
            dbSiteSettingsEx = new DBSiteSettingsEx(connectionString, logFactory);
            dbSiteFolder = new DBSiteFolder(connectionString, logFactory);
        }
コード例 #4
0
ファイル: GeoRepository.cs プロジェクト: ludev/cloudscribe
        public GeoRepository(
            SqliteConnectionstringResolver connectionStringResolver,
            ILoggerFactory loggerFactory)
        {
            if (connectionStringResolver == null) { throw new ArgumentNullException(nameof(connectionStringResolver)); }
            if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); }

            logFactory = loggerFactory;
            log = loggerFactory.CreateLogger(typeof(GeoRepository).FullName);
            connectionString = connectionStringResolver.Resolve();

            dbGeoCountry = new DBGeoCountry(connectionString, logFactory);
            dbGeoZone = new DBGeoZone(connectionString, logFactory);
            dbLanguage = new DBLanguage(connectionString, logFactory);
            dbCurrency = new DBCurrency(connectionString, logFactory);
        }
コード例 #5
0
ファイル: UserRepository.cs プロジェクト: ludev/cloudscribe
        public UserRepository(
            SqliteConnectionstringResolver connectionStringResolver,
            ILoggerFactory loggerFactory)
        {
            if (connectionStringResolver == null) { throw new ArgumentNullException(nameof(connectionStringResolver)); }
            if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); }

            logFactory = loggerFactory;
            log = loggerFactory.CreateLogger(typeof(UserRepository).FullName);
            connectionString = connectionStringResolver.Resolve();

            dbSiteUser = new DBSiteUser(connectionString, logFactory);
            dbUserLogins = new DBUserLogins(connectionString, logFactory);
            dbUserClaims = new DBUserClaims(connectionString, logFactory);
            dbUserLocation = new DBUserLocation(connectionString, logFactory);
            dbRoles = new DBRoles(connectionString, logFactory);
        }