Inheritance: Ncqrs.Eventing.Sourcing.SourcedEvent, IIdentifiable
Exemplo n.º 1
0
        public void RemoveFromRole(Guid userID, string role)
        {
            var e = new UserRemovedFromRoleEvent(Guid.NewGuid(), Guid.Empty, Version + 1, DateTime.UtcNow)
            {
                UserID = userID,
                Role = role,
                TimeStamp = DateTime.UtcNow
            };

            ApplyEvent(e);
        }
Exemplo n.º 2
0
 protected void OnUserRemovedFromRoleEvent(UserRemovedFromRoleEvent e)
 {
     if (_roles != null && _roles.Contains(e.Role))
     {
         _roles.Remove(e.Role);
     }
 }