Esempio n. 1
0
        public TrackedLock(TrackedLockCollection collection, Func <string> getName = null)
        {
            Collection = collection;
            GetName    = getName;

            collection.Track(this);
        }
Esempio n. 2
0
 private void EnsureTracked()
 {
     if (!_IsTracked)
     {
         lock (this) {
             if (!_IsTracked)
             {
                 Collection.Track(WeakSelf);
                 _IsTracked = true;
             }
         }
     }
 }