protected DbBase( Container container, DbSerializerBase serializer, bool isReadOnly, bool validateStateBeforeSave) { Container = container ?? throw new ArgumentNullException(nameof(container)); Serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); IsReadOnly = isReadOnly; ValidateStateBeforeSave = validateStateBeforeSave; }
protected DbPartitionBase(DbBase db, string partitionKey, DbSerializerBase serializer) { if (string.IsNullOrEmpty(partitionKey)) { throw new ArgumentNullException(nameof(partitionKey)); } DB = db ?? throw new ArgumentNullException(nameof(db)); PartitionKeyString = partitionKey; Serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); PartitionKey = new PartitionKey(partitionKey); }
protected ChangeFeedProcessorBase( BatchProcessor batchProcessor, DbSerializerBase serializer, Container databaseContainer, Container leaseContainer, string processorName, int maxItemsPerBatch = DefaultMaxItemsPerBatch, TimeSpan?pollInterval = null, DateTime?startTime = null) { if (string.IsNullOrWhiteSpace(processorName)) { throw new ArgumentNullException(nameof(processorName)); } if (maxItemsPerBatch < 1) { throw new ArgumentOutOfRangeException(nameof(maxItemsPerBatch)); } if (maxItemsPerBatch > MaxMaxItemsPerBatch) { maxItemsPerBatch = MaxMaxItemsPerBatch; } MaxItemsPerBatch = maxItemsPerBatch; Serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); PollInterval = pollInterval ?? DefaultPollInterval; if (PollInterval < TimeSpan.Zero) { throw new ArgumentOutOfRangeException(nameof(pollInterval)); } if (PollInterval < MinPollInterval) { PollInterval = MinPollInterval; } else if (PollInterval > MaxPollInterval) { PollInterval = MaxPollInterval; } StartTime = startTime ?? IsoDateCheater.MinValue; BatchProcessor = batchProcessor ?? throw new ArgumentNullException(nameof(batchProcessor)); ProcessorName = processorName; DatabaseContainer = databaseContainer ?? throw new ArgumentNullException(nameof(databaseContainer)); LeaseContainer = leaseContainer ?? throw new ArgumentNullException(nameof(leaseContainer)); }
public ReadByIdsAsyncDb(Container container, DbSerializerBase serializer, bool isReadOnly, bool validateStateBeforeSave) : base(container, serializer, isReadOnly, validateStateBeforeSave) { }
public TestChangeFeed(DbSerializerBase serializer, Container databaseContainer, Container leaseContainer, string processorName, int maxItemsPerBatch, TimeSpan?pollInterval, DateTime?startTime, BatchProcessor batchProcessor) : base(batchProcessor, serializer, databaseContainer, leaseContainer, processorName, maxItemsPerBatch, pollInterval, startTime) { }
public TestBatch(DbSerializerBase serializer, TransactionalBatch transactionalBatch, string partitionKey) : base(serializer, transactionalBatch, partitionKey, true) { }
public TestPartition(DbBase db, string partitionKey, DbSerializerBase serializer) : base(db, partitionKey, serializer) { }