public TrackedLock(TrackedLockCollection collection, Func <string> getName = null) { Collection = collection; GetName = getName; collection.Track(this); }
private void EnsureTracked() { if (!_IsTracked) { lock (this) { if (!_IsTracked) { Collection.Track(WeakSelf); _IsTracked = true; } } } }