다음을 통해 공유


TwinCollection Constructors

Definition

Overloads

TwinCollection()

Creates instance of TwinCollection. Shouldn't use this constructor since _metadata is null and calling GetLastUpdated can result in NullReferenceException

TwinCollection(String)

Creates a TwinCollection using a JSON fragment as the body.

TwinCollection(JObject, JObject)

Creates a TwinCollection using the given JSON fragments for the body and metadata.

TwinCollection(String, String)

Creates a TwinCollection using the given JSON fragments for the body and metadata.

TwinCollection()

Creates instance of TwinCollection. Shouldn't use this constructor since _metadata is null and calling GetLastUpdated can result in NullReferenceException

public TwinCollection ();
Public Sub New ()

Applies to

TwinCollection(String)

Creates a TwinCollection using a JSON fragment as the body.

public TwinCollection (string twinJson);
new Microsoft.Azure.Devices.Shared.TwinCollection : string -> Microsoft.Azure.Devices.Shared.TwinCollection
Public Sub New (twinJson As String)

Parameters

twinJson
String

JSON fragment containing the twin data.

Applies to

TwinCollection(JObject, JObject)

Creates a TwinCollection using the given JSON fragments for the body and metadata.

public TwinCollection (Newtonsoft.Json.Linq.JObject twinJson, Newtonsoft.Json.Linq.JObject metadataJson);
new Microsoft.Azure.Devices.Shared.TwinCollection : Newtonsoft.Json.Linq.JObject * Newtonsoft.Json.Linq.JObject -> Microsoft.Azure.Devices.Shared.TwinCollection
Public Sub New (twinJson As JObject, metadataJson As JObject)

Parameters

twinJson
Newtonsoft.Json.Linq.JObject

JSON fragment containing the twin data.

metadataJson
Newtonsoft.Json.Linq.JObject

JSON fragment containing the metadata.

Applies to

TwinCollection(String, String)

Creates a TwinCollection using the given JSON fragments for the body and metadata.

public TwinCollection (string twinJson, string metadataJson);
new Microsoft.Azure.Devices.Shared.TwinCollection : string * string -> Microsoft.Azure.Devices.Shared.TwinCollection
Public Sub New (twinJson As String, metadataJson As String)

Parameters

twinJson
String

JSON fragment containing the twin data.

metadataJson
String

JSON fragment containing the metadata.

Applies to