Class Message
Static methods that simplify Message<T> creation.
Namespace: Microsoft.Psi
Assembly: Microsoft.Psi.dll
Syntax
public static class Message : object
Methods
View SourceCreate<T>(T, DateTime, DateTime, Int32, Int32)
Creates a new instance of the Message<T> struct.
Declaration
public static Message<T> Create<T>(T data, DateTime originatingTime, DateTime time, int sourceId, int sequenceId)
Parameters
Type | Name | Description |
---|---|---|
T | data | The data to time-stamp. |
DateTime | originatingTime | The time of the real-world event that led to the creation of this message. |
DateTime | time | The time of this message. |
System.Int32 | sourceId | The source id of this message. |
System.Int32 | sequenceId | The sequence id of this message. |
Returns
Type | Description |
---|---|
Message<T> | The newly created message. |
Type Parameters
Name | Description |
---|---|
T | The payload of the message. |
Create<T>(T, Envelope)
Creates a new instance of the Message<T> struct.
Declaration
public static Message<T> Create<T>(T data, Envelope envelope)
Parameters
Type | Name | Description |
---|---|---|
T | data | The data to time-stamp. |
Envelope | envelope | The envelope of the message. |
Returns
Type | Description |
---|---|
Message<T> | The newly created message. |
Type Parameters
Name | Description |
---|---|
T | The payload of the message. |