Beispiel #1
0
 //Delete document from index
 private void OnDelete(object source, FileSystemEventArgs eventArgs)
 {
     var fileShareDocument = new FileShareDocument(eventArgs.Name);
     client.Delete<FileShareDocument>(fileShareDocument.NameHashed);
     Console.WriteLine("File Deleted: {0} ", eventArgs.FullPath);
 }
Beispiel #2
0
 //Add document to index
 private void OnCreated(object source, FileSystemEventArgs eventArgs)
 {
     var fileShareDocument = new FileShareDocument(eventArgs.Name, eventArgs.FullPath);
     client.Index(fileShareDocument);
     Console.WriteLine("File added: {0} {1}", eventArgs.FullPath, eventArgs.ChangeType);
 }