Example #1
0
        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... ////////////////////////////
Example #2
0
 void IUserStateCreated.AddUserRoleEvent(IUserRoleStateCreated e)
 {
     this._userRoleEvents.AddUserRoleEvent(e);
 }
Example #3
0
 public virtual void AddUserRoleEvent(IUserRoleStateCreated e)
 {
     ThrowOnInconsistentEventIds(e);
     this._userRoleEvents[e.StateEventId] = e;
 }
Example #4
0
 void IUserRoleState.When(IUserRoleStateCreated e)
 {
     throw new NotSupportedException();
 }