ConnectorTriggerPayload Class

Definition

Helpers that turn a raw Connector Namespace trigger callback (an HTTP body delivered as a String or Stream) into a typed TriggerCallbackPayload<T> or into the decoded file bytes of a binary-content trigger.

public static class ConnectorTriggerPayload
type ConnectorTriggerPayload = class
Public Class ConnectorTriggerPayload
Inheritance
ConnectorTriggerPayload

Remarks

Connector Namespace delivers two distinct trigger callback shapes for file connectors:

All metadata reads use case-insensitive property matching, so payloads whose wire fields are camelCase deserialize correctly instead of silently yielding all-null items.

Fields

Name Description
DefaultMaxBodySizeBytes

The default maximum trigger callback body size, in bytes, enforced by the stream-based readers (100 MB). This is a generous ceiling that guards against unbounded buffering of a hostile or malformed stream while comfortably accommodating large binary-content callbacks. Override it per call with the maxBodySizeBytes parameter.

Properties

Name Description
SerializerOptions

Gets a copy of the JsonSerializerOptions used to read trigger callback payloads. Property matching is case-insensitive so camelCase wire fields bind correctly.

Methods

Name Description
Read<TPayload>(String)

Reads a metadata trigger callback (for example OneDrive OnNewFilesV2) into its typed payload. The expected wire shape is {"body":{"value":[{...item...}]}}.

ReadAsync<TPayload>(Stream, Int64, CancellationToken)

Reads a metadata trigger callback (for example OneDrive OnNewFilesV2) from a stream into its typed payload. The expected wire shape is {"body":{"value":[{...item...}]}}.

ReadBinaryContentAsync(Stream, Int64, CancellationToken)

Reads a binary-content trigger callback (for example OneDrive OnNewFileV2) from a stream, whose wire shape is {"body":"<base64>"}, into the decoded file bytes.

TryReadBinaryContent(String, Byte[])

Attempts to read a binary-content trigger callback (for example OneDrive OnNewFileV2), whose wire shape is {"body":"<base64>"}, into the decoded file bytes.

Applies to