private IEnumerable <ExcelImportRuleCellPoco> BuildProperties() { if (!IsNew) { var ex = new Exception(@"Попытка создания пустых полей для записанного правила импорта"); Log.Exception(ex); #if DEBUG throw ex; #endif } return(( from property in CatalogItemSchema.Properties select new ExcelImportRuleCellPoco() { RowIndex = 0, Property = property, FormatterGuid = FormattersLocator.Search(CatalogItemSchema.GetPropertyConcreteType(property)).First().Guid }).ToArray()); }
void BufferWriterRoutine() { ReadedCount = 0; try { foreach (var rawRow in _externalReader.GetRecords()) { _buffer.Push(CatalogItemSchema.BuildRecord(_formatter.Format(rawRow))); ReadedCount++; } } catch (Exception ex) { Log.Exception(ex); } finally { Close(); _buffer.Finish(); } GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced); }