}// 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... ////////////////////////////
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... ////////////////////////////
}// 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... ////////////////////////////
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) ); }
public UserClaimStateEventIdDto(UserClaimStateEventId val) { this._value = val; }
protected UserClaimStateEventId NewUserClaimStateEventId(int claimId) { var stateEventId = new UserClaimStateEventId(this.StateEventId.UserId, claimId, this.StateEventId.Version); return(stateEventId); }
protected UserClaimStateEventBase(UserClaimStateEventId stateEventId) { this.StateEventId = stateEventId; }
public UserClaimStateRemoved(UserClaimStateEventId stateEventId) : base(stateEventId) { }
public UserClaimStateMergePatched(UserClaimStateEventId stateEventId) : base(stateEventId) { }
public UserClaimStateCreated(UserClaimStateEventId stateEventId) : base(stateEventId) { }
private UserClaimStateRemoved NewUserClaimStateRemoved(UserClaimStateEventId stateEventId) { return(new UserClaimStateRemoved(stateEventId)); }
private UserClaimStateMergePatched NewUserClaimStateMergePatched(UserClaimStateEventId stateEventId) { return(new UserClaimStateMergePatched(stateEventId)); }