/// <summary> /// Validates this instance. /// </summary> public override void Validate() { Assumption.AssertNotNullOrWhiteSpace(this.Id, nameof(this.Id)); Assumption.AssertLessThanOrEqual(this.Id.Length, Person.maxIdChars, nameof(this.Id)); if (this.UserName != null) { Assumption.AssertLessThanOrEqual(this.UserName.Length, Person.maxUsernameChars, nameof(this.UserName)); } if (this.Email != null) { Assumption.AssertLessThanOrEqual(this.Email.Length, Person.maxEmailChars, nameof(this.Email)); } base.Validate(); }