Пример #1
0
        public SqlMessageStore(
            DbProviderFactory factory,
            string connectionString,
            SqlMessageStoreWriter writer,
            JournalMessageTypeRegistrar types)
        {
            if (factory == null)
            {
                throw new ArgumentNullException("factory");
            }

            if (string.IsNullOrWhiteSpace(connectionString))
            {
                throw new ArgumentNullException("connectionString");
            }

            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }

            if (types == null)
            {
                throw new ArgumentNullException("types");
            }

            this.factory          = factory;
            this.connectionString = connectionString;
            this.writer           = writer;
            this.types            = types;
        }
        public SqlMessageStoreWriter(
            SqlBulkInsertSession session,
            SqlBulkInsertCommandBuilder builder,
            JournalMessageTypeRegistrar types,
            int maxSliceSize)
        {
            if (session == null)
            {
                throw new ArgumentNullException("session");
            }

            if (builder == null)
            {
                throw new ArgumentNullException("builder");
            }

            if (types == null)
            {
                throw new ArgumentNullException("types");
            }

            if (maxSliceSize < 10)
            {
                throw new ArgumentOutOfRangeException("maxSliceSize");
            }

            this.session      = session;
            this.builder      = builder;
            this.types        = types;
            this.maxSliceSize = maxSliceSize;
        }
 public SqlBulkInsertCommandBuilder(JournalMessageTypeRegistrar types, SqlBulkInsertSession session)
 {
     this.types   = types;
     this.session = session;
 }