Class XmlAuditTrailWriter
- Namespace
- TimeCockpit.Data.AuditTrail
- Assembly
- TimeCockpit.Data.dll
Represents an class that can write an audit trail entry for two given entity objects.
public class XmlAuditTrailWriter
- Inheritance
-
ObjectXmlAuditTrailWriter
- Inherited Members
-
Object.ToString()Object.Equals(Object)Object.Equals(Object, Object)Object.ReferenceEquals(Object, Object)Object.GetHashCode()Object.GetType()Object.MemberwiseClone()
Constructors
XmlAuditTrailWriter()
public XmlAuditTrailWriter()
Methods
WriteAuditTrail(EntityObject, EntityObject, XmlWriter, out IEnumerable<String>, DatabaseOperation)
Takes two instance of an EntityObject (old and new) and writes an entry for every differing value.
public static void WriteAuditTrail(EntityObject oldEntityObject, EntityObject newEntityObject, XmlWriter xmlWriter, out IEnumerable<string> changedMemberNames, DatabaseOperation operationType = DatabaseOperation.Update)
Parameters
oldEntityObjectEntityObjectThe old EntityObject.
newEntityObjectEntityObjectThe new EntityObject.
xmlWriterXmlWriterThe XML writer to write the xml to.
changedMemberNamesIEnumerable<String>Names of changed members.
operationTypeDatabaseOperationA value indicating the type of the operation.
Exceptions
- System.InvalidOperationException
Thrown if a AuditTrail should be written from two EntityObjects with different ids.
- System.ArgumentException
Thrown if xmlWriter is null.