public UserRoleStateEventIdDtoWrapper(UserRoleStateEventId val) { if (val == null) { throw new ArgumentNullException("val"); } this._value = val; }
public virtual UserRoleStateEventId ToUserRoleStateEventId() { UserRoleStateEventId v = new UserRoleStateEventId(); v.UserId = this.UserId; v.RoleId = this.RoleId; v.UserVersion = this.UserVersion; return v; }
}// 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... ////////////////////////////
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... ////////////////////////////
}// 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... ////////////////////////////
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) ); }
protected UserRoleStateEventBase(UserRoleStateEventId stateEventId) { this.StateEventId = stateEventId; }
public UserRoleStateRemoved(UserRoleStateEventId stateEventId) : base(stateEventId) { }
public UserRoleStateMergePatched(UserRoleStateEventId stateEventId) : base(stateEventId) { }
public UserRoleStateCreated(UserRoleStateEventId stateEventId) : base(stateEventId) { }
public UserRoleStateEventIdFlattenedDto(UserRoleStateEventId val) { this._value = new UserRoleStateEventIdDtoWrapper(val); }
protected UserRoleStateEventId NewUserRoleStateEventId(string roleId) { var stateEventId = new UserRoleStateEventId(this.StateEventId.UserId, roleId, this.StateEventId.Version); return(stateEventId); }
private UserRoleStateRemoved NewUserRoleStateRemoved(UserRoleStateEventId stateEventId) { return(new UserRoleStateRemoved(stateEventId)); }
private UserRoleStateMergePatched NewUserRoleStateMergePatched(UserRoleStateEventId stateEventId) { return(new UserRoleStateMergePatched(stateEventId)); }