Exemplo n.º 1
0
        /// <summary>
        /// <para>
        /// Audits the this HermesActivityGroup against another HermesActivityGroup.
        /// 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>
        /// </summary>
        /// <exception cref="IllegalAuditItemException">
        /// If old HermesActivityGroup is the same object as this instance.
        /// </exception>
        /// <param name="old">HermesActivityGroup to compary this to</param>
        /// <returns>IList of HermesAuditRecords detailing any changes</returns>
        public IList <HermesAuditRecord> Audit(HermesActivityGroup 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(HermesActivityGroup old)",
                                                         new string[] { "values" }, new object[] { values },
                                                         new string[] { "old" }, new object[] { old }, new string[0], new object[0]);
            }

            return(Helper.GetAuditRecords <HermesActivityGroup>(this, old, Id));
        }
Exemplo n.º 2
0
 /// <remarks>285</remarks>
 /// <summary>
 /// <p>Audits the this HermesActivityGroup against another HermesActivityGroup. 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 HermesActivityGroup is the same object as this
 /// </exception>
 /// <param name="old">HermesActivityGroup to compary this to</param>
 /// <returns>IList of HermesAuditRecords detailing any changes</returns>
 public IList <HermesAuditRecord> Audit(HermesActivityGroup old)
 {
     throw new NotImplementedException();
 }