static public void Watch(object target, bool shouldShowNonPublic, string targetName) { if (target == null) { return; } if (targetName == null) { if (target is Type) { targetName = (target as Type).Name; } else { targetName = target.GetType().Name; } } if (_instance == null) { _instance = new FWatcher(); } _instance.DoWatch(target, targetName, shouldShowNonPublic); }
public void Close(Program program) { #if USEWATCHERS if (FWatcher != null) { FWatcher.Changed -= new FileSystemEventHandler(DirectoryChanged); FWatcher.Created -= new FileSystemEventHandler(DirectoryChanged); FWatcher.Deleted -= new FileSystemEventHandler(DirectoryChanged); FWatcher.Renamed -= new RenamedEventHandler(DirectoryRenamed); FWatcher.Dispose(); FWatcher = null; } #endif }
public static void Watch(object target, bool shouldShowNonPublic, string targetName) { if(target == null) return; if(targetName == null) { if(target is Type) { targetName = (target as Type).Name; } else { targetName = target.GetType().Name; } } if(_instance == null) { _instance = new FWatcher(); } _instance.DoWatch(target, targetName, shouldShowNonPublic); }
private void Destroy() { UnityEngine.Object.Destroy(gameObject); FWatcher.RemoveWatcherLink(this); }
private static void Init() { _instance = new FWatcher(); }