Ejemplo n.º 1
0
 public static string GetMyProperty(this FileSystemWatcher watcher)
 {
     if (MyProperty != null && MyProperty.ContainsKey[watcher.GetHashCode()])
     {
         return(FileSystemWatcherExtensions.MyProperty[watcher.GetHashCode()]);
     }
     else
     {
         return(null);
     }
 }
Ejemplo n.º 2
0
 public static void SetMyProperty(this FileSystemWatcher watcher, string value)
 {
     if (MyProperty == null)
     {
         MyProperty = new Dictionary <string, string>();
     }
     FileSystemWatcherExtensions.MyProperty[watcher.GetHashCode()] = value;
 }