Exemplo n.º 1
0
 private static void DoAddDocuments(AddDocumentSubOptions verbSubOptions)
 {
     FileInfo[] files = verbSubOptions.GetDocumentFiles();
     XmlSerializer serializer = new XmlSerializer(typeof(ServiceModelAbstractionType));
     List<Document> docs = new List<Document>();
     foreach (var file in files)
     {
         ServiceModelAbstractionType serviceModelAbs = (ServiceModelAbstractionType)serializer.Deserialize(file.OpenRead());
         foreach (var serviceModel in serviceModelAbs.ServiceModel)
         {
             var operationDocs = GetOperationDocs(serviceModel, file.Name);
             docs.AddRange(operationDocs);
             var dataModelDocs = GetDataModelDocs(serviceModel, file.Name);
             docs.AddRange(dataModelDocs);
         }
     }
     FieldIndexSupport.AddDocuments(verbSubOptions.LuceneIndexRoot, docs.ToArray(), new WhitespaceAnalyzer());
 }
Exemplo n.º 2
0
        public Options()
        {
            ReindexVerb = new ReindexSubOptions();
            ReindexGraphVerb = new ReindexGraphSubOptions();
            AddGraphDocumentVerb = new AddGraphDocumentSubOptions();
            AddDocumentVerb = new AddDocumentSubOptions();

            RemoveDocumentVerb = new RemoveDocumentSubOptions();
            QueryVerb = new QuerySubOptions();
        }