Class AuditLogEntry
- Namespace
- RetailForce.Fiscalisation.Model.AuditLog
- Assembly
- RetailForce.Fiscalisation.Model.dll
Represents an audit log entry.
public class AuditLogEntry : StorageRecord, IEquatable<StorageRecord>, IEquatable<AuditLogEntry>
- Inheritance
-
AuditLogEntry
- Implements
- Inherited Members
Remarks
Please take care also to change the dto in fiscal service client!
Constructors
AuditLogEntry()
Constructor.
public AuditLogEntry()
AuditLogEntry(Document)
Constructor.
public AuditLogEntry(Document document)
Parameters
documentDocumentThe document to create the audit log entry.
AuditLogEntry(Guid, DateTime?, LogEntryType, string, Guid?, User, decimal?, string)
Constructor.
public AuditLogEntry(Guid uniqueClientId, DateTime? auditDateTime, LogEntryType logEntryType, string message = "", Guid? documentGuid = null, User user = null, decimal? amount = null, string identifier = "")
Parameters
uniqueClientIdGuidThe unique client id this audit log entry belongs. This property will not be stored to the log file.
auditDateTimeDateTime?The datetime of the audit log entry. If null Now is used.
logEntryTypeLogEntryTypeThe type of the audit log entry.
messagestringThe message of the audit log.
documentGuidGuid?A possible connection to a document of the audit log entry.
userUserThe user (if applicable) of the audit log entry.
amountdecimal?A possible amount for the audit log entry.
identifierstringA possible identifier for the audit log entry.
Fields
ValidCharPattern
public const string ValidCharPattern = "[^\\da-zA-Z\\(\\)\\[\\]\\?!\\.\\-,;:/&§#%=]+"
Field Value
Properties
Amount
The amount for this audit log
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public decimal? Amount { get; set; }
Property Value
DocumentGuid
A possible connection to a document of the audit log entry.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public Guid? DocumentGuid { get; set; }
Property Value
- Guid?
Identifier
An additional identifier for the audit log entry
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string Identifier { get; set; }
Property Value
Remarks
Has to be set at
LogEntryType
The type of the audit log entry.
public LogEntryType LogEntryType { get; set; }
Property Value
Message
The message of the audit log.
public string Message { get; set; }
Property Value
RecordId
The unique id of the record.
public Guid RecordId { get; set; }
Property Value
UniqueClientId
The unique client id this audit log entry belongs.
public Guid UniqueClientId { get; set; }
Property Value
Remarks
This property will not be stored to the log file.
User
The user (if applicable) of the audit log entry.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public User? User { get; set; }
Property Value
Methods
Equals(AuditLogEntry)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(AuditLogEntry other)
Parameters
otherAuditLogEntryAn object to compare with this object.
Returns
GetData()
Method to get data property. Override in inherited class to get data in string notation.
protected override string GetData()
Returns
SetData(string)
Method to set data property. Override in inherited class to parse data if necessary.
protected override void SetData(string data)
Parameters
datastringThe data to set.
Exceptions
- ArgumentNullException
Thrown if parameter
datais set to null or Empty.