/// <summary> /// <para> /// Audits the this HermesActivityType against another HermesActivityType. /// It makes a field-by-field comparison testing what has changed. For each property /// that has a value different from other, one HermesAuditRecord is added to the returned list. /// </para> /// <para> /// If a property is a text type then the TextValue1 and TextValue2 proeprties /// of the HermesAuditRecord are populated with the property value of the old and current instance. /// If a property is a numeric type then the NumericValue1 and NumericValue2 proeprties /// of the HermesAuditRecord are populated with the property value of the old and current instance. /// </para> /// <para>The ActivityGroup property is compared on the basis of its Name.</para> /// </summary> /// <exception cref="IllegalAuditItemException"> /// If old HermesActivityType is the same object as this instance. /// </exception> /// <param name="old">HermesActivityType to compary this to</param> /// <returns>IList of HermesAuditRecords detailing any changes</returns> public IList <HermesAuditRecord> Audit(HermesActivityType old) { if (object.ReferenceEquals(old, this)) { IllegalAuditItemException e = new IllegalAuditItemException("Cannot audit an item against itself."); throw Helper.GetSelfDocumentingException(e, e.Message, GetType().FullName + "Audit(HermesActivityType old)", new string[] { "values" }, new object[] { values }, new string[] { "old" }, new object[] { old }, new string[0], new object[0]); } return(Helper.GetAuditRecords <HermesActivityType>(this, old, Id)); }
/// <remarks>183</remarks> /// <summary> /// <p>Audits the this HermesActivityType against another HermesActivityType. It makes a field-by-field /// comparison testing what has changed.</p> <p>This method will fill the TextValue# or NumericValue#, and ID /// fields of each HermesAuditRecord it generates. It will be up to the service using this entity to fill the /// other fields.</p> <p><strong>Implementation Notes</strong></p> <ol type="disc"> <li>If the passed entity is /// null, jus create one HermesAuditRecord</li> <li>Iterate over the Values field. For each changed property: /// <ol type="disc"> <li>Create new HermesAuditRecord.</li> <li>If it is numeric, set hermesAuditRecord's /// NumericValue2 field to this entity's property value, and the NumericValue1 field to the passed entity's /// property value</li> <li>If it is text, set hermesAuditRecord's TextValue2 field to this entity's property /// value, and the TextValue1 field to the passed entity's property value</li> </ol> </li> <li>Return the /// HermesAuditRecords as an IList of HermesAuditRecord</li> </ol> /// </summary> /// <exception cref="IllegalAuditItemException"> /// IllegalAuditItemException If old HermesActivityType is the same object as this /// </exception> /// <param name="old">HermesActivityType to compary this to</param> /// <returns>IList of HermesAuditRecords detailing any changes</returns> public IList <HermesAuditRecord> Audit(HermesActivityType old) { throw new NotImplementedException(); }