Skip to content

AuditPayload

Namespace AgentPrism · Assembly AgentPrism.Core.dll

Builds a small JSON object for the audit trail.

public static class AuditPayload

objectAuditPayload

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Writes a JSON object and returns it as text.

public static string Write(Action<Utf8JsonWriter> writeBody)

writeBody Action<Utf8JsonWriter>

Writes the object’s properties. The braces are supplied.

string

The serialized object.

ArgumentNullException

writeBody is null.

Writes a JSON object holding one array of strings.

public static string WriteArray(string propertyName, IEnumerable<string> values)

propertyName string

The array property’s name.

values IEnumerable<string>

The values; each one is escaped.

string

The serialized object.

ArgumentNullException

values is null.