Ejemplo n.º 1
0
        public LogRepository(
            IOptions<FirebirdConnectionOptions> configuration)
        {
            if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); }
           
            readConnectionString = configuration.Value.ReadConnectionString;
            writeConnectionString = configuration.Value.WriteConnectionString;

            dbSystemLog = new DBSystemLog(readConnectionString, writeConnectionString);

        }
Ejemplo n.º 2
0
        public LogRepository(
            IOptions<FirebirdConnectionOptions> configuration,
            ILoggerFactory loggerFactory)
        {
            if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); }
            if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); }

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

            readConnectionString = configuration.Options.ReadConnectionString;
            writeConnectionString = configuration.Options.WriteConnectionString;

            dbSystemLog = new DBSystemLog(readConnectionString, writeConnectionString, logFactory);

        }
Ejemplo n.º 3
0
        public LogRepository(
            IOptions <FirebirdConnectionOptions> configuration,
            ILoggerFactory loggerFactory)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

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

            readConnectionString  = configuration.Options.ReadConnectionString;
            writeConnectionString = configuration.Options.WriteConnectionString;

            dbSystemLog = new DBSystemLog(readConnectionString, writeConnectionString, logFactory);
        }