public virtual void When(IUserRoleStateRemoved e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
}// END Map(IMergePatch... //////////////////////////// protected virtual IUserRoleStateRemoved MapRemove(IRemoveUserRole c, IUserCommand outerCommand, long version) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new UserRoleEventId(c.UserId, c.RoleId, version); IUserRoleStateRemoved e = NewUserRoleStateRemoved(stateEventId); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }// END Map(IRemove... ////////////////////////////
}// END Map(IMergePatch... //////////////////////////// protected virtual IUserRoleStateRemoved MapRemove(IRemoveUserRole c, IUserCommand outerCommand, long version) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new UserRoleStateEventId(c.UserId, c.RoleId, version); IUserRoleStateRemoved e = NewUserRoleStateRemoved(stateEventId); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = DateTime.Now; return(e); }// END Map(IRemove... ////////////////////////////
public virtual UserRoleStateRemovedDto ToUserRoleStateRemovedDto(IUserRoleStateRemoved e) { var dto = new UserRoleStateRemovedDto(); dto.UserRoleEventId = e.UserRoleEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.Version = e.Version; dto.CommandId = e.CommandId; return(dto); }
void IUserStateDeleted.AddUserRoleEvent(IUserRoleStateRemoved e) { this._userRoleEvents.AddUserRoleEvent(e); }
public virtual void AddUserRoleEvent(IUserRoleStateRemoved e) { ThrowOnInconsistentEventIds(e); this._userRoleEvents[e.StateEventId] = e; }
public void AddUserRoleEvent(IUserRoleStateRemoved e) { _innerStateEvents.Add((UserRoleStateRemovedDto)e); }
void IUserRoleState.When(IUserRoleStateRemoved e) { throw new NotSupportedException(); }