private async Task ProcessDeviceInfo(dynamic deviceInfo) { string versionAsString = ""; if (deviceInfo.Version != null) { dynamic version = deviceInfo.Version; versionAsString = version.ToString(); } switch (versionAsString) { case SampleDeviceFactory.VERSION_1_0: //Data coming in from the simulator can sometimes turn a boolean into 0 or 1. //Check the HubEnabledState since this is actually displayed and make sure it's in a good format DeviceSchemaHelper.FixDeviceSchema(deviceInfo); dynamic id = DeviceSchemaHelper.GetConnectionDeviceId(deviceInfo); string name = id.ToString(); Trace.TraceInformation("ProcessEventAsync -- DeviceInfo: {0}", name); await _deviceLogic.UpdateDeviceFromDeviceInfoPacketAsync(deviceInfo); break; default: Trace.TraceInformation("Unknown version {0} provided in Device Info packet", versionAsString); break; } }