Esempio n. 1
0
 public IEnumerable Handle(LockRole c)
 {
     if (_locked)
     {
         throw new InvalidOperationException("角色已锁定!");
     }
     yield return(new RoleLocked {
         Id = c.Id
     });
 }
Esempio n. 2
0
 public IHttpActionResult LockRole(LockRole role)
 {
     _messageDispatcher.SendCommand(role);
     return(Ok());
 }