Ejemplo n.º 1
0
        public SqlQueue(Uri uri,
                        IScriptProvider scriptProvider,
                        IDatabaseContextFactory databaseContextFactory,
                        IDatabaseGateway databaseGateway)
        {
            Guard.AgainstNull(uri, "uri");
            Guard.AgainstNull(scriptProvider, "scriptProvider");
            Guard.AgainstNull(databaseContextFactory, "databaseContextFactory");
            Guard.AgainstNull(databaseGateway, "databaseGateway");

            _scriptProvider         = scriptProvider;
            _databaseContextFactory = databaseContextFactory;
            _databaseGateway        = databaseGateway;

            _log = Log.For(this);

            Uri = uri;

            var parser = new SqlUriParser(uri);

            _connectionName = parser.ConnectionName;
            _tableName      = parser.TableName;

            BuildQueries();
        }
Ejemplo n.º 2
0
        public SqlQueue(Uri uri,
						IScriptProvider scriptProvider,
						IDatabaseConnectionFactory databaseConnectionFactory,
						IDatabaseGateway databaseGateway)
        {
            Guard.AgainstNull(uri, "uri");
            Guard.AgainstNull(scriptProvider, "scriptProvider");
            Guard.AgainstNull(databaseConnectionFactory, "databaseConnectionFactory");
            Guard.AgainstNull(databaseGateway, "databaseGateway");

            _scriptProvider = scriptProvider;
            _databaseConnectionFactory = databaseConnectionFactory;
            _databaseGateway = databaseGateway;

            _log = Log.For(this);

            Uri = uri;

            parser = new SqlUriParser(uri);

            _dataSource = new DataSource(parser.ConnectionName, new SqlDbDataParameterFactory());
            _tableName = parser.TableName;

            BuildQueries();
        }