Beispiel #1
0
        }// 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... ////////////////////////////
Beispiel #2
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... ////////////////////////////
Beispiel #3
0
        }// END Map(ICreate... ////////////////////////////

        protected virtual IUserRoleStateMergePatched MapMergePatch(IMergePatchUserRole c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId             = new UserRoleStateEventId(c.UserId, c.RoleId, version);
            IUserRoleStateMergePatched e = NewUserRoleStateMergePatched(stateEventId);
            var s = outerState.UserRoles.Get(c.RoleId);

            e.Active = c.Active;
            e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(IMergePatch... ////////////////////////////
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            UserRoleStateEventId other = obj as UserRoleStateEventId;

            if (other == null)
            {
                return(false);
            }

            return(true &&
                   Object.Equals(this.UserId, other.UserId) &&
                   Object.Equals(this.RoleId, other.RoleId) &&
                   Object.Equals(this.UserVersion, other.UserVersion)
                   );
        }
Beispiel #5
0
        protected UserRoleStateEventId NewUserRoleStateEventId(string roleId)
        {
            var stateEventId = new UserRoleStateEventId(this.StateEventId.UserId, roleId, this.StateEventId.Version);

            return(stateEventId);
        }
Beispiel #6
0
 private UserRoleStateRemoved NewUserRoleStateRemoved(UserRoleStateEventId stateEventId)
 {
     return(new UserRoleStateRemoved(stateEventId));
 }
Beispiel #7
0
 private UserRoleStateMergePatched NewUserRoleStateMergePatched(UserRoleStateEventId stateEventId)
 {
     return(new UserRoleStateMergePatched(stateEventId));
 }
 public UserRoleStateEventIdDto(UserRoleStateEventId val)
 {
     this._value = val;
 }
Beispiel #9
0
 protected UserRoleStateEventBase(UserRoleStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
Beispiel #10
0
 public UserRoleStateRemoved(UserRoleStateEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #11
0
 public UserRoleStateMergePatched(UserRoleStateEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #12
0
 public UserRoleStateCreated(UserRoleStateEventId stateEventId) : base(stateEventId)
 {
 }