public static SfTwinProperties CreateSfTwinProperties(Twin twin) { if (twin != null) { JObject desiredSystemPropertie = GetDesiredSystemProperties(twin); JObject desiredCustomerProperties = GetDesiredCustomerProperties(twin); int desiredLastUpdatedTimestamp = GetDesiredLastUpdatedTimestamp(twin); SfProperties desired = new SfProperties(desiredSystemPropertie, desiredCustomerProperties, desiredLastUpdatedTimestamp); JObject reportedSystemPropertie = GetReportedSystemProperties(twin); JObject reportedCustomerProperties = GetReportedCustomerProperties(twin); int reportedLastUpdatedTimestamp = GetReportedLastUpdatedTimestam(twin); SfProperties reported = new SfProperties(reportedSystemPropertie, reportedCustomerProperties, reportedLastUpdatedTimestamp); return(new SfTwinProperties(desired, reported)); } else { return(new SfTwinProperties()); } }
public SfTwinProperties() { this.Desired = new SfProperties(new JObject(), new JObject(), 0); this.Reported = new SfProperties(new JObject(), new JObject(), 0); }
public SfTwinProperties(SfProperties desired, SfProperties reported) { this.Desired = desired; this.Reported = reported; }