Beispiel #1
0
        public override int SaveChanges(
            IReadOnlyList <InternalEntityEntry> entries)
        {
            Check.NotNull(entries, nameof(entries));

            var commandBatches = _batchPreparer.BatchCommands(entries, _options);

            return(_batchExecutor.Execute(commandBatches, _connection));
        }
Beispiel #2
0
        public override int SaveChanges(
            IReadOnlyList <StateEntry> stateEntries)
        {
            Check.NotNull(stateEntries, "stateEntries");

            var commandBatches = _batchPreparer.BatchCommands(stateEntries, _options);

            return(_batchExecutor.Execute(commandBatches, _connection));
        }
Beispiel #3
0
        /// <summary>
        /// Starts the processing of a batch and returns results when processing is completed.
        /// </summary>
        /// <returns>Document processing results.</returns>
        public IEnumerable<BatchComprenoTaskResult> RunAndWaitResults()
        {
            _connectionLimitValidator.ThrowIfNotEnough(DegreeOfParallelism);

            ISourceProcessor sourceProcessor = createSourceProcessor();
            BatchExecutor executor = new BatchExecutor(_sources, sourceProcessor, OnProgressChanged);

            return executor.Execute(DegreeOfParallelism, Timeout, CancellationToken);
        }