Exemplo n.º 1
0
 public void RemoveWatcher(PrefWatcher wliToRemove)
 {
     this._RWLockWatchers.AcquireWriterLock(-1);
     try
     {
         this._listWatchers.Remove(wliToRemove);
     }
     finally
     {
         this._RWLockWatchers.ReleaseWriterLock();
     }
 }
Exemplo n.º 2
0
 public void RemoveWatcher(PrefWatcher wliToRemove)
 {
     GetWriterLock(this._RWLockWatchers);
     try
     {
         this._listWatchers.Remove(wliToRemove);
     }
     finally
     {
         FreeWriterLock(this._RWLockWatchers);
     }
 }
Exemplo n.º 3
0
        public PrefWatcher AddWatcher(string sPrefixFilter, EventHandler <PrefChangeEventArgs> pcehHandler)
        {
            PrefWatcher item = new PrefWatcher(sPrefixFilter.ToLower(), pcehHandler);

            this._RWLockWatchers.AcquireWriterLock(-1);
            try
            {
                this._listWatchers.Add(item);
            }
            finally
            {
                this._RWLockWatchers.ReleaseWriterLock();
            }
            return(item);
        }
Exemplo n.º 4
0
 public void RemoveWatcher(PrefWatcher wliToRemove)
 {
     GetWriterLock(this._RWLockWatchers);
     try
     {
         this._listWatchers.Remove(wliToRemove);
     }
     finally
     {
         FreeWriterLock(this._RWLockWatchers);
     }
 }
Exemplo n.º 5
0
 public PrefWatcher AddWatcher(string sPrefixFilter, EventHandler<PrefChangeEventArgs> pcehHandler)
 {
     PrefWatcher item = new PrefWatcher(sPrefixFilter.ToLower(), pcehHandler);
     GetWriterLock(this._RWLockWatchers);
     try
     {
         this._listWatchers.Add(item);
     }
     finally
     {
         FreeWriterLock(this._RWLockWatchers);
     }
     return item;
 }