public UserLostRole(Role role, AuthUser user, UserId removedBy, DomainEventId id, ZonedDateTime created) : base(id, TYPE, created) { RoleId = role.Id; Rolename = role.Rolename; UserId = user.Id; Username = user.Username; RemovedBy = removedBy; }
public UserGainedRole(Role role, AuthUser user, UserId assignedBy, DomainEventId id, ZonedDateTime created) : base(id, TYPE, created) { RoleId = role.Id; Rolename = role.Rolename; UserId = user.Id; Username = user.Username; AssignedBy = assignedBy; }
public AuthUserCreated(AuthUser authUser, DomainEventId id, ZonedDateTime created) : base(id, TYPE, created) { UserId = authUser.Id; Username = authUser.Username; }
public RoleCreated(Role role, UserId createdBy, DomainEventId id, ZonedDateTime created) : base(id, TYPE, created) { RoleId = role.Id; Rolename = role.Rolename; CreatedBy = createdBy; }
public override DomainEventBase FromPrimitives (DomainEventId eventId, Dictionary <string, object> body) => new UserWasUpdated(eventId, body);
public UserWasUpdated (DomainEventId eventId, Dictionary <string, object> body) : base(eventId, body) { }
public UserCreated(User user, DomainEventId id, ZonedDateTime createdAt) : base(id, TYPE, createdAt) { UserId = user.Id; Username = user.Username; }
public void Raise(Func <DomainEventId, ZonedDateTime, DomainEvent> evtFunc) { var nextId = new DomainEventId(_idGenerator.ReservePool(1, 0, 0).Next()); Raise(evtFunc(nextId, _clock.UtcNow())); }