Table of Contents

Class SignedMessage<T>

Namespace
Savvyio.Messaging.Cryptography
Assembly
Savvyio.Messaging.dll

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

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

Type Parameters

T

The type of the payload constraint to the IRequest interface.

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

Constructors

SignedMessage(IMessage<T>, String)

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

public SignedMessage(IMessage<T> message, string signature)

Parameters

message IMessage<T>

The message to cryptographically sign.

signature String

The cryptographic signature of the message.

Exceptions

System.ArgumentNullException

message cannot be null - or - signature cannot be null.

ArgumentException

signature cannot be empty or consist only of white-space characters.

Properties

Data

Gets the payload of the message.

public T Data { get; }

Property Value

T

The payload of the message.

Id

Gets the identifier of the message. When combined with Source, this enables deduplication.

public string Id { get; }

Property Value

String

The identifier of the message.

Signature

Gets the cryptographic signature of the message.

public string Signature { get; }

Property Value

String

The cryptographic signature of the message.

Source

Gets the context that describes the origin of the message. When combined with Id, this enables deduplication.

public string Source { get; }

Property Value

String

The context that describes the origin of the message.

Time

Gets the time, expressed as the Coordinated Universal Time (UTC), at which this message was generated.

public DateTime? Time { get; }

Property Value

Nullable<DateTime>

The time at which this message was generated.

Type

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

public string Type { get; }

Property Value

String

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

See Also