Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
 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
 }
Exemplo n.º 3
0
    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);
    }
Exemplo n.º 4
0
 private void Destroy()
 {
     UnityEngine.Object.Destroy(gameObject);
     FWatcher.RemoveWatcherLink(this);
 }
Exemplo n.º 5
0
 private static void Init()
 {
     _instance = new FWatcher();
 }