Exemplo n.º 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... ////////////////////////////
Exemplo n.º 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... ////////////////////////////
Exemplo n.º 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... ////////////////////////////
Exemplo n.º 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)
                   );
        }
Exemplo n.º 5
0
 public UserClaimStateEventIdDto(UserClaimStateEventId val)
 {
     this._value = val;
 }
Exemplo n.º 6
0
        protected UserClaimStateEventId NewUserClaimStateEventId(int claimId)
        {
            var stateEventId = new UserClaimStateEventId(this.StateEventId.UserId, claimId, this.StateEventId.Version);

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