/// <summary> /// Creates a new <see cref="ScreenObjectRecord" /> object instance that is a shallow-copy of the current object instance. /// </summary> /// <returns> /// The shallow-copy of the current <see cref="ScreenObjectRecord" /> object instance. /// </returns> public ScreenObjectRecord Clone() { ScreenObjectRecord record = new ScreenObjectRecord(); record.Id = this.Id; record.AddDate = this.AddDate; record.AddBy = this.AddBy; record.ModDate = this.ModDate; record.ModBy = this.ModBy; record.Url = this.Url; record.Control = this.Control; record.Title = this.Title; record.Icon = this.Icon; record.Display = this.Display; record.ValidatorExpression = this.ValidatorExpression; record.ValidatorMessage = this.ValidatorMessage; record.ValidatorCritical = this.ValidatorCritical; record.MaxLength = this.MaxLength; record.OffText = this.OffText; record.OffColour = this.OffColour; record.OnText = this.OnText; record.OnColour = this.OnColour; record.Requirement = this.Requirement; record.Default = this.Default; return(record); }
/// <summary> /// Indicates whether the current <see cref="ScreenObjectRecord" /> instance is equal to another <see cref="ScreenObjectRecord" /> instance. /// </summary> /// <param name="that"> /// The <see cref="ScreenObjectRecord" /> instance to be compared against this instance. /// </param> /// <returns> /// True if both instances are considered equal; otherwise, false. /// </returns> public Boolean Equals(ScreenObjectRecord that) { Boolean result = true; result = result && (this.Id == that.Id); result = result && (this.Url.TrimOrNullify() == that.Url.TrimOrNullify()); result = result && (this.Control.TrimOrNullify() == that.Control.TrimOrNullify()); result = result && (this.Title.TrimOrNullify() == that.Title.TrimOrNullify()); result = result && (this.Icon.TrimOrNullify() == that.Icon.TrimOrNullify()); result = result && (this.Display == that.Display); result = result && (this.ValidatorExpression.TrimOrNullify() == that.ValidatorExpression.TrimOrNullify()); result = result && (this.ValidatorMessage.TrimOrNullify() == that.ValidatorMessage.TrimOrNullify()); result = result && (this.ValidatorCritical == that.ValidatorCritical); result = result && (this.MaxLength == that.MaxLength); result = result && (this.OffText.TrimOrNullify() == that.OffText.TrimOrNullify()); result = result && (this.OffColour.TrimOrNullify() == that.OffColour.TrimOrNullify()); result = result && (this.OnText.TrimOrNullify() == that.OnText.TrimOrNullify()); result = result && (this.OnColour.TrimOrNullify() == that.OnColour.TrimOrNullify()); result = result && (this.Requirement == that.Requirement); result = result && (this.Default.TrimOrNullify() == that.Default.TrimOrNullify()); return(result); }