/// <inheritdoc cref="IBaseFileImportStage"/>
        public IBaseFileImportStage ProcessStage(ImportParameters parameters)
        {
            CreateImportLogger(parameters);
            var nextStageId = InternalProcess(parameters);

            ImportLogger.SaveLog();
            return(nextStageId.HasValue ? CreateNextStage(nextStageId.Value) : null);
        }
示例#2
0
        private void MergeImportEntities(ImportParameters parameters)
        {
            var keyColumns = GetKeyColumns(parameters).ToList();

            if (keyColumns.Any())
            {
                parameters.Entities = GetMergedImportEntities(parameters.Entities, keyColumns);
                var mergedRowsCount = (uint)(parameters.TotalRowsCount - parameters.Entities.Count);
                if (mergedRowsCount > 0)
                {
                    parameters.NotImportedRowsCount += mergedRowsCount;
                    var eventArgs = new InfoMessageEventArgs {
                        Message = GetMergedImportEntitiesInfoMessage(mergedRowsCount)
                    };
                    ImportLogger.HandleInfoMessage(this, eventArgs);
                }
            }
        }