Table of Contents

Class CloudEventExtensions

Namespace
Virtufin.Api.Services
Assembly
Virtufin.Api.dll
public static class CloudEventExtensions
Inheritance
CloudEventExtensions
Inherited Members

Methods

BuildCloudEvent(string, string, byte[], string?, DateTimeOffset?, string?)

Build a CloudEvent proto from attributes and data.

public static CloudEvent BuildCloudEvent(string type, string source, byte[] data, string? id = null, DateTimeOffset? time = null, string? topic = null)

Parameters

type string
source string
data byte[]
id string
time DateTimeOffset?
topic string

Returns

CloudEvent

ToJsonBytes(CloudEvent)

Serialize a CloudEvent proto to JSON bytes via the CloudNative.CloudEvents library.

public static byte[] ToJsonBytes(this CloudEvent ce)

Parameters

ce CloudEvent

Returns

byte[]

ValidateAttributes(CloudEvent)

Validate a CloudEvent proto's attributes exactly as the JSON form does (the SDK's typed attribute setters), without serializing it to JSON. Throws CloudEventAttributeException for an attribute the SDK rejects, same as ToJsonBytes(CloudEvent).

public static void ValidateAttributes(CloudEvent ce)

Parameters

ce CloudEvent