/// <summary>
 ///     Retrieves a lock object for the string and increments the lock count
 /// </summary>
 internal object GetLockObject(string keyValue)
 {
     lock (_lockObject)
     {
         IdLock thisLock;
         if (_idLocks.ContainsKey(keyValue))
             thisLock = _idLocks[keyValue];
         else
         {
             thisLock = new IdLock();
             _idLocks.Add(keyValue, thisLock);
         }
         thisLock.NumberOfConnections++;
         return thisLock.LockObject;
     }
 }
Esempio n. 2
0
 /// <summary>
 ///     Retrieves a lock object for the string and increments the lock count
 /// </summary>
 internal object GetLockObject(string keyValue)
 {
     lock (_lockObject)
     {
         IdLock thisLock;
         if (_idLocks.ContainsKey(keyValue))
         {
             thisLock = _idLocks[keyValue];
         }
         else
         {
             thisLock = new IdLock();
             _idLocks.Add(keyValue, thisLock);
         }
         thisLock.NumberOfConnections++;
         return(thisLock.LockObject);
     }
 }