Click or drag to resize

AuditorBase Class

Abstract base class for auditors in the LLBLGen Pro system. Use this class to easily create auditors to perform auditing for you.
Inheritance Hierarchy
SystemObject
  SD.LLBLGen.Pro.ORMSupportClassesAuditorBase

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.6.0.0 (5.6.19.0117)
Syntax
[SerializableAttribute]
public abstract class AuditorBase : IAuditor

The AuditorBase type exposes the following members.

Constructors
  NameDescription
Protected methodAuditorBase
Initializes a new instance of the AuditorBase class
Top
Properties
  NameDescription
Public propertyHasDataToXmlSerialize
Gets if the auditor object has data which should be Xml serialized. If this property returns false, no serialization (and thus no deserialization) will take place of the data to XML.
Top
Methods
  NameDescription
Public methodAuditDeleteOfEntity
Audits the successful delete of an entity from the database
Public methodAuditDereferenceOfRelatedEntity
Audits the successful dereference of related entity from the entity passed in.
Public methodAuditDirectDeleteOfEntities
Audits the successful direct delete of entities in the database
Public methodAuditDirectUpdateOfEntities
Audits the succesful direct update of entities in the database.
Public methodAuditEntityFieldGet
Audits when an entity field's value is succesfully obtained from the passed in entity
Public methodAuditEntityFieldSet
Audits when an entity field is set succesfully to a new value.
Public methodAuditInsertOfNewEntity
Audits the successful insert of a new entity into the database.
Public methodAuditLoadOfEntity
Audits the successful load of an entity from the database
Public methodAuditReferenceOfRelatedEntity
Audits the successful reference of related entity from the entity passed in.
Public methodAuditUpdateOfExistingEntity
Audits the successful update of an existing entity in the database
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAuditEntitiesToSave
Gets the audit entities to save. Audit entities contain the audit information stored inside this auditor.
Protected methodGetEntityTypeValueForType
Gets the EntityType value as integer for the entity type passed in
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReadXml(XmlNode)
Reads the auditor data XML.
Public methodReadXml(XmlReader)
Reads the auditor data XML.
Public methodRequiresTransactionForAuditEntities
Method which returns true if this auditor expects to have audit entities to persist and therefore needs a transaction. This method is called in the situation when there's no transaction going on though one should be started right before the single-statement action in the case if the auditor has entities to save afterwards. It's recommended to return true if the auditor might have audit entities to persist after an entity save/delete/direct update/direct delete of entities. Default: true
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTransactionCommitted
The transaction with which the audit entities requested from GetAuditEntitiesToSave were saved. Use this method to clear any audit data in this auditor as all audit information is persisted successfully.
Public methodWriteXml
Method to serialze audit data to XML. Use the aspects passed in to determine various aspects of the XML format. If the audit data consists of entity instances, be sure to pass the passed in processedObjectIDs object to the WriteXml routine of IEntity2, so use the overload of IEntity2.WriteXml() which accepts a reader and the processedObjectIDs. Though it's recommended not to serialize entity objects in audit data, keep audit data as clean as possible from entity references. The start element 'Auditor' has already been written, the end element /Auditor will be written for you after this routine.
Top
Remarks
If you plan to use binary serialization in your application, be sure to read the recommendations in the manual about serialization and auditor objects.
See Also