Class CloudEventExtensions
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
Returns
- CloudEvent
GetStringAttr(CloudEvent, string)
Try to get a string attribute from a CloudEvent proto.
public static string? GetStringAttr(this CloudEvent ce, string key)
Parameters
ceCloudEventkeystring
Returns
ToJsonBytes(CloudEvent)
Serialize a CloudEvent proto to JSON bytes via the CloudNative.CloudEvents library.
public static byte[] ToJsonBytes(this CloudEvent ce)
Parameters
ceCloudEvent
Returns
- byte[]