private async Task <DeviceModel> DeleteDeviceTwinReplication(IDeviceCreateOrUpdateRequested message) { if (JsonConvert.DeserializeObject <DeviceTwinModel>(message.Data) is DeviceTwinModel obj) { await Task.Delay(200); } return(new DeviceModel()); }
private async Task <DeviceModel> CreateOrUpdateDeviceTwinReplication(IDeviceCreateOrUpdateRequested message) { if (JsonConvert.DeserializeObject <DeviceTwinModel>(message.Data) is DeviceTwinModel obj) { StripIntervalProperties(obj?.Properties?.Desired); StripIntervalProperties(obj?.Properties?.Reported); obj.DeviceId = message.DeviceId; return(await _deviceRestService.CreateOrUpdateDevice(obj)); } return(null); }