Class TransportMessage
A message that arrived on a subscribed topic.
public sealed record TransportMessage : IEquatable<TransportMessage>
- Inheritance
-
TransportMessage
- Implements
- Inherited Members
Constructors
TransportMessage(string, byte[])
A message that arrived on a subscribed topic.
public TransportMessage(string Topic, byte[] Payload)
Parameters
TransportMessage(string, string)
Creates a message whose payload is text, such as a command written out.
public TransportMessage(string topic, string text)
Parameters
Properties
Number
Gets the payload as a number written out as text, such as 21.5, or null when it is not one.
public double? Number { get; }
Property Value
Payload
The raw payload bytes.
public byte[] Payload { get; init; }
Property Value
- byte[]
Text
Gets the payload as text: words, or a number written out.
public string Text { get; }
Property Value
Topic
The topic it was published to.
public string Topic { get; init; }