Пример #1
0
 public static IndexWriter AddDocument(this IndexWriter indexWriter, params Action<Document>[] documentActions )
 {
     Document document = new Document();
     document.Setup(documentActions);
     indexWriter.AddDocument(document);
     return indexWriter;
 }
Пример #2
0
 public static void AddDocuments(this IndexWriter wrtr, LDocument[] docs)
 {
     foreach (var d in docs)
     {
         wrtr.AddDocument(d);
     }
 }
Пример #3
0
 /// <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);
 }