Class Twin
- Namespace
- nanoFramework.Azure.Devices.Shared
- Assembly
- nanoFramework.Azure.Devices.Client.dll
Twin Representation.
public class Twin
- Inheritance
-
Twin
- Inherited Members
- Extension Methods
Constructors
Twin()
Creates an instance of Twin.
public Twin()
Twin(string)
Creates an instance of Twin.
public Twin(string deviceId)
Parameters
deviceId
stringDevice Id
Twin(string, string)
Creates an instance of Twin.
public Twin(string deviceId, string jsonTwin)
Parameters
Twin(TwinProperties)
Creates an instance of Twin.
public Twin(TwinProperties twinProperties)
Parameters
twinProperties
TwinPropertiesThe twin properties.
Properties
DeviceId
Gets and sets the Twin Id.
public string DeviceId { get; set; }
Property Value
ModelId
The DTDL model Id of the device.
public string ModelId { get; set; }
Property Value
Remarks
The value will be null for a non-pnp device. The value will be null for a pnp device until the device connects and registers with the model Id.
Properties
Gets and sets the Twin properties.
public TwinProperties Properties { get; set; }
Property Value
Version
Twin's Version
public long Version { get; set; }
Property Value
Methods
ToJson()
Gets the Twin as a JSON string.
public string ToJson()
Returns
- string
JSON string