mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-07-02 10:38:16 +00:00
fix: handle null properties in DeviceMessageBase and DeviceStateMessageBase
This commit is contained in:
parent
162a06f9e9
commit
d18fca8a98
2 changed files with 6 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||
/// <summary>
|
||||
/// The device key
|
||||
/// </summary>
|
||||
[JsonProperty("key")]
|
||||
[JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)]
|
||||
/// <summary>
|
||||
/// Gets or sets the Key
|
||||
/// </summary>
|
||||
|
|
@ -19,19 +19,19 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||
/// <summary>
|
||||
/// The device name
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of the message class
|
||||
/// </summary>
|
||||
[JsonProperty("messageType")]
|
||||
[JsonProperty("messageType", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string MessageType => GetType().Name;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the MessageBasePath
|
||||
/// </summary>
|
||||
[JsonProperty("messageBasePath")]
|
||||
[JsonProperty("messageBasePath", NullValueHandling = NullValueHandling.Ignore)]
|
||||
|
||||
public string MessageBasePath { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||
/// <summary>
|
||||
/// The interfaces implmented by the device sending the messsage
|
||||
/// </summary>
|
||||
[JsonProperty("interfaces")]
|
||||
[JsonProperty("interfaces", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[Obsolete("Interfaces is no longer supported and will be removed in a future release. Interfaces for all devices are now retrieved via the /joinroom endpoint in the MobileControlWebsocketServer")]
|
||||
public List<string> Interfaces { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue