public static object Lock(this string key, Func <object> action)
 {
     using (var lockWrapper = new LockWrapper(key))
     {
         return(lockWrapper.Lock(() => action));
     }
 }
 public static void Lock(this string key, LockWrapper.LockDelegate action)
 {
     using (var lockWrapper = new LockWrapper(key))
     {
         lockWrapper.Lock(action);
     }
 }