private void InitializeImport() { import = new ImportStatistics { StartDateTime = DateTime.Now }; import = unitOfWork.GetCollection <ImportStatistics>().InsertOne(import); }
private void Importer_BatchImported(object sender, BatchImportedEventArgs e) { string info; ImportStatistics stats = e.Statistics; info = "Total read: " + stats.TotalRead + "\n"; info += "Total imported: " + stats.TotalImported + "\n"; info += "TUs added: " + stats.AddedTranslationUnits + "\n"; info += "TUs discarded: " + stats.DiscardedTranslationUnits + "\n"; info += "TUs merged: " + stats.MergedTranslationUnits + "\n"; info += "Errors: " + stats.Errors + "\n"; MessageBox.Show(info, "Import statistics of current chunk"); e.Cancel = false; }