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
-
objectCloudEventExtensions
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
cloudEventICloudEvent<T>The payload to attach within the message.
marshallerIMarshallerThe IMarshaller that is used when converting the
cloudEventinto an ISignedCloudEvent<T>.setupAction<SignedMessageOptions>The SignedMessageOptions which may be configured.
Returns
- ISignedCloudEvent<T>
An instance of SignedCloudEvent<T> constraint to the IIntegrationEvent interface.
Type Parameters
TThe type of the payload constraint to the IIntegrationEvent interface.
Exceptions
- ArgumentNullException
cloudEventcannot be null -or-marshallercannot be null.- ArgumentException
setupfailed to configure an instance of SignedMessageOptions in a valid state.