using Newtonsoft.Json; namespace PepperDash.Essentials.AppServer.Messengers { /// /// Base class for device messages that include the type of message /// public abstract class DeviceMessageBase { /// /// The device key /// [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] /// /// Gets or sets the Key /// public string Key { get; set; } /// /// The device name /// [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] public string Name { get; set; } /// /// The type of the message class /// [JsonProperty("messageType", NullValueHandling = NullValueHandling.Ignore)] public string MessageType => GetType().Name; /// /// Gets or sets the MessageBasePath /// [JsonProperty("messageBasePath", NullValueHandling = NullValueHandling.Ignore)] public string MessageBasePath { get; set; } } }