Ejemplo n.º 1
0
        public virtual DBProcessStatusNotifyerBase CreateDBProcessStatusNotifyer(Type notifyerType, DBConnectionInfo dbConnectionInfo)
        {
            DBQueryStatus dbQueryStatus            = CreateDBQueryStatus(dbConnectionInfo);
            DBProcessStatusNotifyerBase dbNotifyer = Activator.CreateInstance(notifyerType, dbQueryStatus, DBCommandsConsts.DBLongProcessGetStatusIntervalInMs) as DBProcessStatusNotifyerBase;

            return(dbNotifyer);
        }
Ejemplo n.º 2
0
        public DBQueryStatus CreateDBQueryStatus(DBConnectionInfo dbConnectionInfo)
        {
            dbConnectionInfo.ThrowIfNull(nameof(dbConnectionInfo));

            DBQueryStatus dbQueryStatus = null;

            if (!string.IsNullOrWhiteSpace(dbConnectionInfo.DBType) &&
                _dbTypeObjectsFactoryDictionary.TryGetValue(dbConnectionInfo.DBType, out IDBTypeObjectsFactory dbTypeObjectsFactory))
            {
                IDBConnection      adminDBConnection = dbTypeObjectsFactory.CreateAdminDBConnection(dbConnectionInfo);
                IDBScriptsProvider dbScriptsProvider = dbTypeObjectsFactory.CreateDBScriptsProvider();

                dbQueryStatus = new DBQueryStatus(adminDBConnection, dbScriptsProvider);
            }

            return(dbQueryStatus);
        }