/// <summary> /// Creates a new <see cref="LicenseRecord" /> object instance that is a shallow-copy of the current object instance. /// </summary> /// <returns> /// The shallow-copy of the current <see cref="LicenseRecord" /> object instance. /// </returns> public LicenseRecord Clone() { LicenseRecord record = new LicenseRecord(); record.Id = this.Id; record.Active = this.Active; record.Expiry = this.Expiry; record.Owner = this.Owner; record.Signature = this.Signature; return(record); }
/// <summary> /// Indicates whether the current <see cref="LicenseRecord" /> instance is equal to another <see cref="LicenseRecord" /> instance. /// </summary> /// <param name="that"> /// The <see cref="LicenseRecord" /> instance to be compared against this instance. /// </param> /// <returns> /// True if both instances are considered equal; otherwise, false. /// </returns> public Boolean Equals(LicenseRecord that) { Boolean result = true; result = result && (this.Id == that.Id); result = result && (this.Active == that.Active); result = result && (this.Expiry == that.Expiry); result = result && (this.Owner.TrimOrNullify() == that.Owner.TrimOrNullify()); result = result && (this.Signature == that.Signature); return(result); }