public YamahaDevice(DeviceCreationInfo creationInfo) : base(new YamahaState(), creationInfo) { mConfiguration = creationInfo.Configuration; mService = (YamahaService)creationInfo.ServiceManager.GetService(typeof(YamahaService)); mLock = new object(); YamahaState state = (YamahaState)mState; state.Address = creationInfo.Configuration.address; // Set up inputs foreach (var inputConfig in mConfiguration.inputs) state.Inputs.Add(new InputInfo(inputConfig.input, inputConfig.displayName, inputConfig.voiceName)); // Note. Service will trigger a refresh of the device state, however, for a little while until the receiver responds, this device will have a potentially incorrect default state. mService.AddDevice(this); }
public YamahaDevice(DeviceCreationInfo creationInfo) : base(new YamahaState(), creationInfo) { mConfiguration = creationInfo.Configuration; mService = (YamahaService)creationInfo.ServiceManager.GetService(typeof(YamahaService)); mLock = new object(); YamahaState state = (YamahaState)mState; state.Address = creationInfo.Configuration.address; // Set up inputs foreach (var inputConfig in mConfiguration.inputs) { state.Inputs.Add(new InputInfo(inputConfig.input, inputConfig.displayName, inputConfig.voiceName)); } // Note. Service will trigger a refresh of the device state, however, for a little while until the receiver responds, this device will have a potentially incorrect default state. mService.AddDevice(this); }