public Importer(IReaderMapping mapping, IFileSystem fileSystem, IRecordService recordService, IVocabularyService vocabularyService, UserInfo userInfo) { this.mapping = mapping; this.fileSystem = fileSystem; this.recordService = recordService; this.vocabularyService = vocabularyService; this.userInfo = userInfo; }
/// <summary> /// Helper to conveniently create an importer instance. /// </summary> public static Importer CreateImporter(IDocumentSession db, IReaderMapping mapping) { return(new Importer( mapping, new FileSystem(), new RecordService(db, new RecordValidator(new VocabQueryer(db))), new VocabularyService(db, new VocabularyValidator()), new UserInfo { DisplayName = "Topcat Importer", Email = "*****@*****.**" })); }