//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void startWatching() throws InterruptedException public override void StartWatching() { _watch = true; while (_watch) { WatchKey key = _watchService.take(); if (key != null) { //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: java.util.List<java.nio.file.WatchEvent<?>> watchEvents = key.pollEvents(); IList <WatchEvent <object> > watchEvents = key.pollEvents(); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: for (java.nio.file.WatchEvent<?> watchEvent : watchEvents) foreach (WatchEvent <object> watchEvent in watchEvents) { //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: java.nio.file.WatchEvent.Kind<?> kind = watchEvent.kind(); WatchEvent.Kind <object> kind = watchEvent.kind(); if (StandardWatchEventKinds.ENTRY_MODIFY == kind) { NotifyAboutModification(watchEvent); } if (StandardWatchEventKinds.ENTRY_DELETE == kind) { NotifyAboutDeletion(watchEvent); } } key.reset(); } } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void prepareWatcher(TestWatchKey watchKey) throws InterruptedException private void PrepareWatcher(TestWatchKey watchKey) { when(_watchServiceMock.take()).thenReturn(watchKey).thenThrow(typeof(InterruptedException)); }