public async Task <int> GetVolume(int instanceId, RenderingControlChannel channel) { IDictionary <string, string> result = await SendAction("SetVolume", new Dictionary <string, string> { { "InstanceID", instanceId.ToString() }, { "Channel", channel.Value } }); return(int.Parse(result["CurrentVolume"])); }
public async Task SetVolume(int instanceId, RenderingControlChannel channel, int volume) { if (volume < 0) { throw new ArgumentOutOfRangeException(nameof(volume), "Must be greater or equal to zero"); } await SendAction("SetVolume", new Dictionary <string, string> { { "InstanceID", instanceId.ToString() }, { "Channel", channel.Value }, { "DesiredVolume", volume.ToString() } }); }