public DeviceServiceModel(Device azureDevice, DeviceTwinServiceModel 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))
 {
 }
 public DeviceServiceModel(
     string etag,
     string id,
     int c2DMessageCount,
     DateTime lastActivity,
     bool connected,
     bool enabled,
     DateTime lastStatusUpdated,
     DeviceTwinServiceModel twin,
     AuthenticationMechanismServiceModel authentication,
     string ioTHubHostName)
 {
     this.Etag              = etag;
     this.Id                = id;
     this.C2DMessageCount   = c2DMessageCount;
     this.LastActivity      = lastActivity;
     this.Connected         = connected;
     this.Enabled           = enabled;
     this.LastStatusUpdated = lastStatusUpdated;
     this.Twin              = twin;
     this.IoTHubHostName    = ioTHubHostName;
     this.Authentication    = authentication;
 }