public UserRoleStateEventIdDtoWrapper(UserRoleStateEventId val)
 {
     if (val == null)
     {
         throw new ArgumentNullException("val");
     }
     this._value = val;
 }
Ejemplo n.º 2
0
 public virtual UserRoleStateEventId ToUserRoleStateEventId()
 {
     UserRoleStateEventId v = new UserRoleStateEventId();
     v.UserId = this.UserId;
     v.RoleId = this.RoleId;
     v.UserVersion = this.UserVersion;
     return v;
 }
Ejemplo n.º 3
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... ////////////////////////////
Ejemplo n.º 4
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, true);

            e.Active = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(ICreate... ////////////////////////////
Ejemplo n.º 5
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... ////////////////////////////
Ejemplo n.º 6
0
        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)
                   );
        }
Ejemplo n.º 7
0
 protected UserRoleStateEventBase(UserRoleStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
Ejemplo n.º 8
0
 public UserRoleStateRemoved(UserRoleStateEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 9
0
 public UserRoleStateMergePatched(UserRoleStateEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 10
0
 public UserRoleStateCreated(UserRoleStateEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 11
0
 public UserRoleStateEventIdFlattenedDto(UserRoleStateEventId val)
 {
     this._value = new UserRoleStateEventIdDtoWrapper(val);
 }
Ejemplo n.º 12
0
        protected UserRoleStateEventId NewUserRoleStateEventId(string roleId)
        {
            var stateEventId = new UserRoleStateEventId(this.StateEventId.UserId, roleId, this.StateEventId.Version);

            return(stateEventId);
        }
Ejemplo n.º 13
0
 private UserRoleStateRemoved NewUserRoleStateRemoved(UserRoleStateEventId stateEventId)
 {
     return(new UserRoleStateRemoved(stateEventId));
 }
Ejemplo n.º 14
0
 private UserRoleStateMergePatched NewUserRoleStateMergePatched(UserRoleStateEventId stateEventId)
 {
     return(new UserRoleStateMergePatched(stateEventId));
 }