private object GetLockObject(string identifier) { lock (lockObjects) { LockObjectCount c; if (lockObjects.TryGetValue(identifier, out c)) { c.Count++; } else { c = new LockObjectCount(); lockObjects.Add(identifier, c); } return(c); } }
private object GetLockObject(string identifier) { lock (lockObjects) { LockObjectCount c; if (lockObjects.TryGetValue(identifier, out c)) { c.Count++; } else { c = new LockObjectCount(); lockObjects.Add(identifier, c); } return c; } }