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