Skip to content

JobPayload

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Extracts the job item input list from the free-form JSON in JobRecord.Payload/JobSchedule.Payload.

public static class JobPayload

objectJobPayload

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

Both the background worker (when producing a job from a schedule) and the HTTP layer (on manual trigger) must use the same interpretation; this is why it is defined in a single place.

Converts the payload into a job item input list.

public static IReadOnlyList<string> ExtractItems(JsonElement payload)

payload JsonElement

The free-form JSON payload.

IReadOnlyList<string>

If the payload is a JSON array, each element’s text (directly if a string, otherwise its raw JSON text); otherwise the payload itself returned as a single-item list. An empty list if the payload is undefined.