protected override void beforeWriteNodeLogic( bool Creating, bool OverrideUniqueValidation ) { beforePropertySetWriteNode(); if( _CswNbtNode.Properties.Any( Prop => Prop.wasAnySubFieldModified() ) && false == IsTemp && false == _CswNbtResources.CurrentNbtUser is CswNbtSystemUser ) { LastModifiedBy.RelatedNodeId = _CswNbtResources.CurrentNbtUser.UserId; LastModifiedBy.SyncGestalt(); LastModifiedOn.DateTimeValue = DateTime.Now; } }
public bool DeepEquals(GroupBan?other) { return(other is not null && GroupId == other.GroupId && (LastModifiedBy is not null ? LastModifiedBy.DeepEquals(other.LastModifiedBy) : other.LastModifiedBy is null) && (CreatedBy is not null ? CreatedBy.DeepEquals(other.CreatedBy) : other.CreatedBy is null) && DateBanned == other.DateBanned && DateExpires == other.DateExpires && Comment == other.Comment && (BungieNetUserInfo is not null ? BungieNetUserInfo.DeepEquals(other.BungieNetUserInfo) : other.BungieNetUserInfo is null) && (DestinyUserInfo is not null ? DestinyUserInfo.DeepEquals(other.DestinyUserInfo) : other.DestinyUserInfo is null)); }
public void Update(GroupBan?other) { if (other is null) { return; } if (GroupId != other.GroupId) { GroupId = other.GroupId; OnPropertyChanged(nameof(GroupId)); } if (!LastModifiedBy.DeepEquals(other.LastModifiedBy)) { LastModifiedBy.Update(other.LastModifiedBy); OnPropertyChanged(nameof(LastModifiedBy)); } if (!CreatedBy.DeepEquals(other.CreatedBy)) { CreatedBy.Update(other.CreatedBy); OnPropertyChanged(nameof(CreatedBy)); } if (DateBanned != other.DateBanned) { DateBanned = other.DateBanned; OnPropertyChanged(nameof(DateBanned)); } if (DateExpires != other.DateExpires) { DateExpires = other.DateExpires; OnPropertyChanged(nameof(DateExpires)); } if (Comment != other.Comment) { Comment = other.Comment; OnPropertyChanged(nameof(Comment)); } if (!BungieNetUserInfo.DeepEquals(other.BungieNetUserInfo)) { BungieNetUserInfo.Update(other.BungieNetUserInfo); OnPropertyChanged(nameof(BungieNetUserInfo)); } if (!DestinyUserInfo.DeepEquals(other.DestinyUserInfo)) { DestinyUserInfo.Update(other.DestinyUserInfo); OnPropertyChanged(nameof(DestinyUserInfo)); } }
public bool Equals(GroupBan input) { if (input == null) { return(false); } return (( GroupId == input.GroupId || (GroupId.Equals(input.GroupId)) ) && ( LastModifiedBy == input.LastModifiedBy || (LastModifiedBy != null && LastModifiedBy.Equals(input.LastModifiedBy)) ) && ( CreatedBy == input.CreatedBy || (CreatedBy != null && CreatedBy.Equals(input.CreatedBy)) ) && ( DateBanned == input.DateBanned || (DateBanned != null && DateBanned.Equals(input.DateBanned)) ) && ( DateExpires == input.DateExpires || (DateExpires != null && DateExpires.Equals(input.DateExpires)) ) && ( Comment == input.Comment || (Comment != null && Comment.Equals(input.Comment)) ) && ( BungieNetUserInfo == input.BungieNetUserInfo || (BungieNetUserInfo != null && BungieNetUserInfo.Equals(input.BungieNetUserInfo)) ) && ( DestinyUserInfo == input.DestinyUserInfo || (DestinyUserInfo != null && DestinyUserInfo.Equals(input.DestinyUserInfo)) )); }