Table of Contents

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 string

Device Id

Twin(string, string)

Creates an instance of Twin.

public Twin(string deviceId, string jsonTwin)

Parameters

deviceId string

Device Id.

jsonTwin string

The json twin.

Twin(TwinProperties)

Creates an instance of Twin.

public Twin(TwinProperties twinProperties)

Parameters

twinProperties TwinProperties

The twin properties.

Properties

DeviceId

Gets and sets the Twin Id.

public string DeviceId { get; set; }

Property Value

string

ModelId

The DTDL model Id of the device.

public string ModelId { get; set; }

Property Value

string

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

TwinProperties

Version

Twin's Version

public long Version { get; set; }

Property Value

long

Methods

ToJson()

Gets the Twin as a JSON string.

public string ToJson()

Returns

string

JSON string