protected virtual IUserRoleStateCreated MapCreate(ICreateUserRole c, IUserCommand outerCommand, long version, IUserState outerState) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new UserRoleStateEventId(c.UserId, c.RoleId, version); IUserRoleStateCreated e = NewUserRoleStateCreated(stateEventId); var s = outerState.UserRoles.Get(c.RoleId); e.Active = c.Active; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = DateTime.Now; return(e); }// END Map(ICreate... ////////////////////////////
void IUserStateCreated.AddUserRoleEvent(IUserRoleStateCreated e) { this._userRoleEvents.AddUserRoleEvent(e); }
public virtual void AddUserRoleEvent(IUserRoleStateCreated e) { ThrowOnInconsistentEventIds(e); this._userRoleEvents[e.StateEventId] = e; }
void IUserRoleState.When(IUserRoleStateCreated e) { throw new NotSupportedException(); }