Table of Contents

Class CloudEventExtensions

Namespace
Savvyio.EventDriven.Messaging.CloudEvents.Cryptography
Assembly
Savvyio.EventDriven.Messaging.dll

Extension methods for the ICloudEvent<T> interface.

public static class CloudEventExtensions
Inheritance
Object
CloudEventExtensions

Methods

SignCloudEvent<T>(ICloudEvent<T>, IMarshaller, Action<SignedMessageOptions>)

Converts the specified cloudEvent to an ISignedCloudEvent<T> equivalent.

public static ISignedCloudEvent<T> SignCloudEvent<T>(this ICloudEvent<T> cloudEvent, IMarshaller marshaller, Action<SignedMessageOptions> setup = null)
    where T : IIntegrationEvent

Parameters

cloudEvent ICloudEvent<T>

The payload to attach within the message.

marshaller IMarshaller

The IMarshaller that is used when converting the cloudEvent into an ISignedCloudEvent<T>.

setup Action<SignedMessageOptions>

The SignedMessageOptions which may be configured.

Returns

ISignedCloudEvent<T>

An instance of SignedCloudEvent<T> constraint to the IIntegrationEvent interface.

Type Parameters

T

The type of the payload constraint to the IIntegrationEvent interface.

Exceptions

System.ArgumentNullException

cloudEvent cannot be null -or- marshaller cannot be null.

ArgumentException

setup failed to configure an instance of SignedMessageOptions in a valid state.