Table of Contents

Message Constructor

Definition

Namespace
Savvyio.Messaging
Assemblies
Savvyio.Messaging.dll
Source
src/Savvyio.Messaging/Message.cs

Message(string, Uri, string, T, DateTime?)

Initializes a new instance of the Message<T> class.

public Message(string id, Uri source, string type, T data, DateTime? time = null)

Parameters

id string

The identifier of the message.

source Uri

The context that describes the origin of the message.

type string

The type that describes the type of event related to the originating occurrence.

data T

The payload of the message.

time DateTime?

The time at which this message was generated.

Exceptions

ArgumentNullException

id cannot be null - or - source cannot be null - or - type cannot be null - or - data cannot be null.

ArgumentException

id cannot be empty or consist only of white-space characters - or - type cannot be empty or consist only of white-space characters - or - time was not expressed as the Coordinated Universal Time (UTC).