Table of Contents

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

document Document

The 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

uniqueClientId Guid

The unique client id this audit log entry belongs. This property will not be stored to the log file.

auditDateTime DateTime?

The datetime of the audit log entry. If null Now is used.

logEntryType LogEntryType

The type of the audit log entry.

message string

The message of the audit log.

documentGuid Guid?

A possible connection to a document of the audit log entry.

user User

The user (if applicable) of the audit log entry.

amount decimal?

A possible amount for the audit log entry.

identifier string

A possible identifier for the audit log entry.

Fields

ValidCharPattern

public const string ValidCharPattern = "[^\\da-zA-Z\\(\\)\\[\\]\\?!\\.\\-,;:/&§#%=]+"

Field Value

string

Properties

Amount

The amount for this audit log

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public decimal? Amount { get; set; }

Property Value

decimal?

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

string

Remarks

Has to be set at

LogEntryType

The type of the audit log entry.

public LogEntryType LogEntryType { get; set; }

Property Value

LogEntryType

Message

The message of the audit log.

public string Message { get; set; }

Property Value

string

RecordId

The unique id of the record.

public Guid RecordId { get; set; }

Property Value

Guid

UniqueClientId

The unique client id this audit log entry belongs.

public Guid UniqueClientId { get; set; }

Property Value

Guid

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

User

Methods

Equals(AuditLogEntry)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(AuditLogEntry other)

Parameters

other AuditLogEntry

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetData()

Method to get data property. Override in inherited class to get data in string notation.

protected override string GetData()

Returns

string

SetData(string)

Method to set data property. Override in inherited class to parse data if necessary.

protected override void SetData(string data)

Parameters

data string

The data to set.

Exceptions

ArgumentNullException

Thrown if parameter data is set to null or Empty.