internal void ExitTypeOfLock(string typeOf)
        {
            if (TypeOfLock.Contains(typeOf.ToLowerInvariant()))
            {
                TypeOfLock.Remove(typeOf.ToLowerInvariant());
            }

            Monitor.ExitLock(typeOf);
        }
        internal void EnterTypeOfLock(string typeOf)
        {
            Monitor.EnterLock(typeOf);

            if (!TypeOfLock.Contains(typeOf.ToLowerInvariant()))
            {
                TypeOfLock.Add(typeOf.ToLowerInvariant());
            }
        }
        internal void ExitAllTypeOfLock()
        {
            var typeOfList = new List <string>(TypeOfLock);

            foreach (var typeOf in typeOfList)
            {
                ExitTypeOfLock(typeOf);
            }

            TypeOfLock.Clear();
        }