public void When(UserLocked e)
 {
     _writer.UpdateOrThrow(e.Id, lv =>
         {
             lv.IsLocked = true;
             lv.LockoutMessage = e.LockReason;
         });
 }
Example #2
0
 public void When(UserLocked e)
 {
     m_writer.UpdateOrThrow(e.UserID, lv =>
     {
         lv.LockedOutTillUtc = e.LockedTillUtc;
         lv.LockoutMessage = e.LockReason;
     });
 }
Example #3
0
 public void When(UserLocked e)
 {
     _writer.UpdateOrThrow(e.Id, lv =>
     {
         lv.IsLocked       = true;
         lv.LockoutMessage = e.LockReason;
     });
 }
Example #4
0
 public void When(UserLocked e)
 {
     _writer.UpdateOrThrow(e.Id, lv =>
     {
         lv.LockedOutTillUtc = e.LockedTillUtc;
         lv.LockoutMessage   = e.LockReason;
     });
 }
Example #5
0
 /// <summary>锁定用户
 /// </summary>
 public Task <AsyncTaskResult> HandleAsync(UserLocked evnt)
 {
     return(TryUpdateRecordAsync(connection =>
     {
         return connection.UpdateAsync(new
         {
             Status = UserStatus.Locked.ToString(),
             Version = evnt.Version,
             EventSequence = evnt.Sequence
         }, new
         {
             UserId = evnt.AggregateRootId,
             Version = evnt.Version - 1
         }, ConfigSettings.UserTable);
     }));
 }
Example #6
0
 public void Handle(UserLocked e)
 {
     Update(e.Id, c => c.Locked = true);
 }
Example #7
0
 public void When(UserLocked e)
 {
     LockoutMessage = e.LockReason;
     LockedOutTillUtc = e.LockedTillUtc;
 }
Example #8
0
 static string When(UserLocked e)
 {
     return string.Format("User {0} locked with reason '{1}'.", e.Id.Id, e.LockReason);
 }
 public void When(UserLocked e)
 {
     _writer.UpdateOrThrow(e.SecurityId, view => view.Lock(e.Id, e.LockReason));
 }
Example #10
0
 static string When(UserLocked e)
 {
     return(string.Format("User {0} locked with reason '{1}'.", e.Id.Id, e.LockReason));
 }
Example #11
0
 public void When(UserLocked e)
 {
     LockoutMessage = e.LockReason;
     Locked         = true;
 }
 public void When(UserLocked e)
 {
     _writer.UpdateOrThrow(e.SecurityId, cv => cv.Update(e.Id, v => v.IsLocked = true));
 }
Example #13
0
 public void When(UserLocked e)
 {
     _writer.UpdateOrThrow(e.SecurityId, view => view.Lock(e.Id, e.LockReason));
 }
Example #14
0
 public void Apply(UserLocked e)
 {
     _locked = true;
 }
 public void When(UserLocked e)
 {
     _writer.UpdateOrThrow(e.SecurityId, cv => cv.Update(e.Id, v => v.IsLocked = true));
 }
Example #16
0
 public void When(UserLocked e)
 {
     LockoutMessage   = e.LockReason;
     LockedOutTillUtc = e.LockedTillUtc;
 }
 public void When(UserLocked e)
 {
     LockoutMessage = e.LockReason;
     Locked = true;
 }