Table of Contents

Class Message<T>

Namespace
Savvyio.Messaging
Assembly
Savvyio.Messaging.dll

Provides a default implementation of the IMessage<T> interface.

public class Message<T> : Acknowledgeable, IEquatable<Acknowledgeable>, IMessage<T>, IAcknowledgeable, IEquatable<Message<T>> where T : IRequest

Type Parameters

T

The type of the payload constraint to the IRequest interface.

Inheritance
Object
Message<T>
Implements
IEquatable<Acknowledgeable>
IEquatable<Message<T>>
Inherited Members
Extension Methods

Constructors

Message(String, Uri, String, T, Nullable<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 Nullable<DateTime>

The time at which this message was generated.

Exceptions

System.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).

Properties

Data

public T Data { get; }

Property Value

T

Id

public string Id { get; }

Property Value

String

Source

public string Source { get; }

Property Value

String

Time

public DateTime? Time { get; }

Property Value

Nullable<DateTime>

Type

public string Type { get; }

Property Value

String

See Also