Ejemplo n.º 1
0
        public LogRepository(
            SqlCeConnectionStringResolver connectionStringResolver)
        {
            if (connectionStringResolver == null) { throw new ArgumentNullException(nameof(connectionStringResolver)); }
            //if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); }

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

            dbSystemLog = new DBSystemLog(connectionString);
        }
Ejemplo n.º 2
0
        public GeoRepository(
            SqlCeConnectionStringResolver 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);
        }
Ejemplo n.º 3
0
        public Db(
            SqlCeConnectionStringResolver connectionStringResolver,
            ILoggerFactory loggerFactory,
            IVersionProviderFactory versionProviderFactory)
        {
            if (connectionStringResolver == null) { throw new ArgumentNullException(nameof(connectionStringResolver)); }
            if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); }
            if (versionProviderFactory == null) { throw new ArgumentNullException(nameof(versionProviderFactory)); }

            versionProviders = versionProviderFactory;
            logFactory = loggerFactory;
            log = loggerFactory.CreateLogger(typeof(Db).FullName);
            connectionString = connectionStringResolver.Resolve();
            sqlCeFilePath = connectionStringResolver.SqlCeFilePath;

        }
        public SiteRepository(
            SqlCeConnectionStringResolver 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);

        }
Ejemplo n.º 5
0
        public UserRepository(
            SqlCeConnectionStringResolver connectionStringResolver,
            ILoggerFactory loggerFactory)
        {
            if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); }
            if (connectionStringResolver == null) { throw new ArgumentNullException(nameof(connectionStringResolver)); }

            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);
        }
Ejemplo n.º 6
0
        public Db(
            SqlCeConnectionStringResolver connectionStringResolver,
            ILoggerFactory loggerFactory,
            IVersionProviderFactory versionProviderFactory)
        {
            if (connectionStringResolver == null)
            {
                throw new ArgumentNullException(nameof(connectionStringResolver));
            }
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }
            if (versionProviderFactory == null)
            {
                throw new ArgumentNullException(nameof(versionProviderFactory));
            }

            versionProviders = versionProviderFactory;
            logFactory       = loggerFactory;
            log = loggerFactory.CreateLogger(typeof(Db).FullName);
            connectionString = connectionStringResolver.Resolve();
            sqlCeFilePath    = connectionStringResolver.SqlCeFilePath;
        }