예제 #1
0
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IUserClaimStateRemoved MapRemove(IRemoveUserClaim c, IUserCommand outerCommand, long version)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId         = new UserClaimStateEventId(c.UserId, c.ClaimId, version);
            IUserClaimStateRemoved e = NewUserClaimStateRemoved(stateEventId);


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;

            return(e);
        }// END Map(IRemove... ////////////////////////////
예제 #2
0
        protected virtual IUserClaimStateCreated MapCreate(ICreateUserClaim c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId         = new UserClaimStateEventId(c.UserId, c.ClaimId, version);
            IUserClaimStateCreated e = NewUserClaimStateCreated(stateEventId);
            var s = outerState.UserClaims.Get(c.ClaimId);

            e.ClaimType  = c.ClaimType;
            e.ClaimValue = c.ClaimValue;
            e.Active     = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(ICreate... ////////////////////////////
예제 #3
0
        }// END Map(ICreate... ////////////////////////////

        protected virtual IUserClaimStateMergePatched MapMergePatch(IMergePatchUserClaim c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new UserClaimStateEventId(c.UserId, c.ClaimId, version);
            IUserClaimStateMergePatched e = NewUserClaimStateMergePatched(stateEventId);
            var s = outerState.UserClaims.Get(c.ClaimId);

            e.ClaimType  = c.ClaimType;
            e.ClaimValue = c.ClaimValue;
            e.Active     = c.Active;
            e.IsPropertyClaimTypeRemoved  = c.IsPropertyClaimTypeRemoved;
            e.IsPropertyClaimValueRemoved = c.IsPropertyClaimValueRemoved;
            e.IsPropertyActiveRemoved     = c.IsPropertyActiveRemoved;

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

            UserClaimStateEventId other = obj as UserClaimStateEventId;

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

            return(true &&
                   Object.Equals(this.UserId, other.UserId) &&
                   Object.Equals(this.ClaimId, other.ClaimId) &&
                   Object.Equals(this.UserVersion, other.UserVersion)
                   );
        }
예제 #5
0
 public UserClaimStateEventIdDto(UserClaimStateEventId val)
 {
     this._value = val;
 }
예제 #6
0
        protected UserClaimStateEventId NewUserClaimStateEventId(int claimId)
        {
            var stateEventId = new UserClaimStateEventId(this.StateEventId.UserId, claimId, this.StateEventId.Version);

            return(stateEventId);
        }
예제 #7
0
 protected UserClaimStateEventBase(UserClaimStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
예제 #8
0
 public UserClaimStateRemoved(UserClaimStateEventId stateEventId) : base(stateEventId)
 {
 }
예제 #9
0
 public UserClaimStateMergePatched(UserClaimStateEventId stateEventId) : base(stateEventId)
 {
 }
예제 #10
0
 public UserClaimStateCreated(UserClaimStateEventId stateEventId) : base(stateEventId)
 {
 }
예제 #11
0
 private UserClaimStateRemoved NewUserClaimStateRemoved(UserClaimStateEventId stateEventId)
 {
     return(new UserClaimStateRemoved(stateEventId));
 }
예제 #12
0
 private UserClaimStateMergePatched NewUserClaimStateMergePatched(UserClaimStateEventId stateEventId)
 {
     return(new UserClaimStateMergePatched(stateEventId));
 }