public void Volumes_MultipleVolumes_ShouldParseThemAll() { IList <UPnPLastChangeValue> _testData = new List <UPnPLastChangeValue>(); RenderingControlEvent _controlEvent; _testData.Add(new UPnPLastChangeValue { Key = "Volume", Attributes = new Dictionary <string, string> { { "channel", "Master" }, { "val", "17" } } }); _testData.Add(new UPnPLastChangeValue { Key = "Volume", Attributes = new Dictionary <string, string> { { "channel", "LF" }, { "val", "100" } } }); Assert.NotNull(RenderingControlChannel.GetByValue("Master")); _controlEvent = new RenderingControlEvent(_testData); Assert.Equal(2, _controlEvent.Volumes.Count); Assert.Equal(17, _controlEvent.Volumes[RenderingControlChannel.Master]); Assert.Equal(100, _controlEvent.Volumes[RenderingControlChannel.LeftFront]); }
private void RenderingControlOnLastChangeEvent(object sender, RenderingControlEvent e) { OnUpdate?.Invoke(this, new KeyValuePair <string, string>("volume", e.Volumes[RenderingControlChannel.Master].ToString())); }