Exemplo n.º 1
0
        private UserClaimEventId NewUserClaimEventId(int claimId)
        {
            var eId = new UserClaimEventId();

            eId.UserId      = this.UserEventId.UserId;
            eId.ClaimId     = claimId;
            eId.UserVersion = this.UserEventId.Version;
            return(eId);
        }
Exemplo n.º 2
0
        }// END Map(IMergePatch... ////////////////////////////

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


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

            return(e);
        }// END Map(IRemove... ////////////////////////////
Exemplo n.º 3
0
        protected virtual IUserClaimStateCreated MapCreate(ICreateUserClaim c, IUserCommand outerCommand, long version, IUserState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId         = new UserClaimEventId(c.UserId, c.ClaimId, version);
            IUserClaimStateCreated e = NewUserClaimStateCreated(stateEventId);
            var s = outerState.UserClaims.Get(c.ClaimId, true);

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

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();
            return(e);
        }// END Map(ICreate... ////////////////////////////
Exemplo n.º 4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            UserClaimEventId other = obj as UserClaimEventId;

            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
 private UserClaimStateRemoved NewUserClaimStateRemoved(UserClaimEventId stateEventId)
 {
     return(new UserClaimStateRemoved(stateEventId));
 }
Exemplo n.º 6
0
 private UserClaimStateMergePatched NewUserClaimStateMergePatched(UserClaimEventId stateEventId)
 {
     return(new UserClaimStateMergePatched(stateEventId));
 }
Exemplo n.º 7
0
 protected UserClaimStateEventDtoBase(UserClaimEventId stateEventId)
 {
     this.UserClaimEventId = stateEventId;
 }
Exemplo n.º 8
0
        protected UserClaimEventId NewUserClaimEventId(int claimId)
        {
            var stateEventId = new UserClaimEventId(this.UserEventId.UserId, claimId, this.UserEventId.Version);

            return(stateEventId);
        }
Exemplo n.º 9
0
 public UserClaimStateRemoved(UserClaimEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 10
0
 public UserClaimStateMergePatched(UserClaimEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 11
0
 public UserClaimStateCreated(UserClaimEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 12
0
 protected UserClaimStateEventBase(UserClaimEventId stateEventId) : base(stateEventId)
 {
 }