Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System/System.IO/FileSystemWatcher.cs')
-rw-r--r--mcs/class/System/System.IO/FileSystemWatcher.cs18
1 files changed, 13 insertions, 5 deletions
diff --git a/mcs/class/System/System.IO/FileSystemWatcher.cs b/mcs/class/System/System.IO/FileSystemWatcher.cs
index d3d421ccc21..c23400daefe 100644
--- a/mcs/class/System/System.IO/FileSystemWatcher.cs
+++ b/mcs/class/System/System.IO/FileSystemWatcher.cs
@@ -115,13 +115,21 @@ namespace System.IO {
mode = InternalSupportsFSW ();
bool ok = false;
- if (mode == 3)
- ok = KeventWatcher.GetInstance (out watcher);
- else if (mode == 2)
- ok = FAMWatcher.GetInstance (out watcher);
- else if (mode == 1)
+ switch (mode) {
+ case 1: // windows
ok = DefaultWatcher.GetInstance (out watcher);
//ok = WindowsWatcher.GetInstance (out watcher);
+ break;
+ case 2: // libfam
+ ok = FAMWatcher.GetInstance (out watcher, false);
+ break;
+ case 3: // kevent
+ ok = KeventWatcher.GetInstance (out watcher);
+ break;
+ case 4: // libgamin
+ ok = FAMWatcher.GetInstance (out watcher, true);
+ break;
+ }
if (mode == 0 || !ok)
DefaultWatcher.GetInstance (out watcher);