public static IndexWriter AddDocument(this IndexWriter indexWriter, params Action<Document>[] documentActions ) { Document document = new Document(); document.Setup(documentActions); indexWriter.AddDocument(document); return indexWriter; }
public static void AddDocuments(this IndexWriter wrtr, LDocument[] docs) { foreach (var d in docs) { wrtr.AddDocument(d); } }
/// <summary> /// Creates a new solution instance with the project updated to include a new document that /// will load its text from the file path. /// </summary> public static Solution AddDocument(this Solution solution, DocumentId documentId, string filePath, IEnumerable<string> folders = null) { return solution.AddDocument(documentId, Path.GetFileName(filePath), new FileTextLoader(filePath), folders); }