public DeviceServiceModel(
     string etag,
     string id,
     int c2DMessageCount,
     DateTime lastActivity,
     bool connected,
     bool enabled,
     bool isEdgeDevice,
     DateTime lastStatusUpdated,
     TwinServiceModel twin,
     AuthenticationMechanismServiceModel authentication,
     string ioTHubHostName)
 {
     this.Etag              = etag;
     this.Id                = id;
     this.C2DMessageCount   = c2DMessageCount;
     this.LastActivity      = lastActivity;
     this.Connected         = connected;
     this.Enabled           = enabled;
     this.IsEdgeDevice      = isEdgeDevice;
     this.LastStatusUpdated = lastStatusUpdated;
     this.Twin              = twin;
     this.IoTHubHostName    = ioTHubHostName;
     this.Authentication    = authentication;
 }
コード例 #2
0
 public DeviceServiceModel(Device azureDevice, TwinServiceModel twin, string ioTHubHostName) :
     this(
         etag : azureDevice.ETag,
         id : azureDevice.Id,
         c2DMessageCount : azureDevice.CloudToDeviceMessageCount,
         lastActivity : azureDevice.LastActivityTime,
         connected : azureDevice.ConnectionState.Equals(DeviceConnectionState.Connected),
         enabled : azureDevice.Status.Equals(DeviceStatus.Enabled),
         lastStatusUpdated : azureDevice.StatusUpdatedTime,
         twin : twin,
         ioTHubHostName : ioTHubHostName,
         authentication : new AuthenticationMechanismServiceModel(azureDevice.Authentication))
 {
 }
コード例 #3
0
 public DeviceServiceModel(DeviceServiceModel azureDevice, TwinServiceModel azureTwin, string ioTHubHostName, bool isConnected, string text) :
     this(
         etag : azureDevice.Etag,
         id : azureDevice.Id,
         c2DMessageCount : azureDevice.C2DMessageCount,
         lastActivity : azureDevice.LastActivity,
         connected : azureDevice.Connected,
         enabled : azureDevice.Enabled.Equals(DeviceStatus.Enabled),
         isEdgeDevice : azureDevice.IsEdgeDevice,
         lastStatusUpdated : azureDevice.LastStatusUpdated,
         twin : azureTwin,
         ioTHubHostName : ioTHubHostName,
         authentication : azureDevice.Authentication)
 {
 }