private void GetInternalDevice() { BindingFlags eFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; var fieldInfo = (typeof(Microsoft.SmartDevice.Connectivity.Wrapper.DeviceObject)).GetField("mDevice", eFlags); if (fieldInfo != null) { _internalDevice = fieldInfo.GetValue(_device.CurrentDevice) as Microsoft.SmartDevice.Connectivity.Device; } // TODO: throw exception if this fails? }
internal WP7Device(MsDevice nativeDevice) { this.nativeDevice = nativeDevice; Name = nativeDevice.Name; IsEmulator = Name.Contains("Emulator"); }