Example #1
0
        public IHttpActionResult LockAction(LockModel model)
        {
            _lock.ToLock(model.LockKey, model.LockValue, () =>
            {
                LockController.Flag = LockController.Flag + 1;
            });


            return(Ok(LockController.Flag));
        }
Example #2
0
 public IHttpActionResult UnLock(LockModel model)
 {
     return(Ok(_lock.UnlockKey(model.LockKey, model.LockValue)));
 }