Exemplo n.º 1
0
 public LiteEngine(
     IUtil util,
     IProfileManager profileManager,
     IScriptService scriptService,
     IProfileWriter profileWriter,
     IConnectionManagerFactory connectionManagerFactory,
     ICloudProfileLoaderService cloudProfileLoaderService,
     ILITETask liteTaskManager,
     IProfileStorage profileStorage,
     IConnectionFinder connectionFinder,
     ILitePurgeService litePurgeService,
     IConfigurationLoader configurationLoader,
     IProfileConnectionsInitializer connectionsInitializer,
     ILogger <LiteEngine> logger)
 {
     Throw.IfNull(util);
     _profileManager            = profileManager;
     _profileWriter             = profileWriter;
     _connectionManagerFactory  = connectionManagerFactory;
     _cloudProfileLoaderService = cloudProfileLoaderService;
     _scriptService             = scriptService;
     _taskManager            = liteTaskManager;
     _profileStorage         = profileStorage;
     _connectionFinder       = connectionFinder;
     _litePurgeService       = litePurgeService;
     _configurationLoader    = configurationLoader;
     _connectionsInitializer = connectionsInitializer;
     _logger = logger;
 }
Exemplo n.º 2
0
 public BaseRepository(IConnectionManagerFactory factory, string constr, ILoggerFactory loggerFactory) : base(factory, constr)
 {
     this._constr = constr;
     if (_logger == null)
     {
         _logger = loggerFactory.CreateLogger <SQLMetrics>();
     }
 }
Exemplo n.º 3
0
        public ConnectionScope(IConnectionManagerFactory mgr, string constr, IConnectionFactory factory)
        {
            this._conStr       = constr;
            _connectionManager = factory == null?
                                 mgr.GetConnectionManager(constr)
                                     : mgr.GetConnectionManager(factory, constr);

            //this._dbFactory = factory;
        }
Exemplo n.º 4
0
 public LITEController(
     IConnectionFinder connectionFinder,
     IProfileJsonHelper profileJsonHelper,
     IConnectionManagerFactory connectionManagerFactory,
     ILogger <LITEController> logger)
 {
     _connectionFinder         = connectionFinder;
     _profileJsonHelper        = profileJsonHelper;
     _connectionManagerFactory = connectionManagerFactory;
     _logger = logger;
 }
Exemplo n.º 5
0
 public ProfileConnectionsInitializer(
     IProfileManager profileManager,
     IConnectionFinder connectionFinder,
     IConnectionManagerFactory connectionManagerFactory,
     ILogger <ProfileConnectionsInitializer> logger)
 {
     _profileManager           = profileManager;
     _connectionFinder         = connectionFinder;
     _connectionManagerFactory = connectionManagerFactory;
     _logger = logger;
 }
Exemplo n.º 6
0
 public LITETask(
     IConnectionManagerFactory connectionManagerFactory,
     IProfileStorage profileStorage,
     ILiteTaskUpdater liteTaskUpdater,
     ILogger <LITETask> logger)
 {
     _connectionManagerFactory = connectionManagerFactory;
     _profileStorage           = profileStorage;
     _liteTaskUpdater          = liteTaskUpdater;
     _logger = logger;
 }
Exemplo n.º 7
0
        public TransScope(IConnectionManagerFactory mgr, IConnectionFactory factory, string connectionString, TransScopeOption option = TransScopeOption.Required)
        {
            _connectionManager = factory == null?
                                 mgr.GetConnectionManager(connectionString)
                                     : mgr.GetConnectionManager(factory, connectionString);

            if (!_connectionManager.IsExistDbTransaction() || option == TransScopeOption.RequiresNew)
            {
                _tran = _connectionManager.BeginTransaction();
                _beginTransactionIsInCurrentTransScope = true;
            }
            else
            {
                _tran = _connectionManager.Transaction;
            }
        }
Exemplo n.º 8
0
 public UserRepository(IConnectionManagerFactory factory, IOptions <DBOption> Option, ILoggerFactory loggerFactory)
     : base(factory, Option.Value.Master, loggerFactory)
 {
 }
Exemplo n.º 9
0
 protected BaseRepository(IConnectionManagerFactory mgr, IConnectionFactory factory, string constr)
 {
     this._conStr    = constr;
     this._dbFactory = factory;
     this._mgr       = mgr;
 }
Exemplo n.º 10
0
 protected BaseRepository(IConnectionManagerFactory mgr, string constr)
     : this(mgr, null, constr)
 {
 }
Exemplo n.º 11
0
 public MySqlRepository(IConnectionManagerFactory cmFactory, string constr)
     : base(cmFactory, constr)
 {
 }
Exemplo n.º 12
0
 protected MySqlRepository(IConnectionManagerFactory cmFactory, IConnectionFactory factory, string constr)
     : base(cmFactory, factory, constr)
 {
 }
Exemplo n.º 13
0
        //private IConnectionFactory _dbFactory;

        public ConnectionScope(IConnectionManagerFactory mgr, string constr) : this(mgr, constr, null)
        {
        }
Exemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TransScope"/> class.
 /// </summary>
 /// <param name="connectionString">The connection string.</param>
 /// <param name="option">The option.</param>
 public TransScope(IConnectionManagerFactory mgr, string connectionString, TransScopeOption option = TransScopeOption.Required)
     : this(mgr, null, connectionString, option)
 {
     _option = option;
 }