示例#1
0
        /// <summary>
        ///     Executes the SetMute action.
        /// </summary>
        /// <param name="instanceId">In value for the InstanceID action parameter.</param>
        /// <param name="channel">In value for the Channel action parameter.</param>
        /// <param name="desiredMute">In value for the DesiredMute action parameter.</param>
        public async Task SetMute(UInt32 instanceId, AargtypeMuteChannelEnum channel, Boolean desiredMute)
        {
            var loIn = new object[3];

            loIn[0] = instanceId;
            loIn[1] = RenderingControlExtensions.ToStringAargtypeMuteChannel(channel);
            loIn[2] = desiredMute;
            var action = new SoapAction
            {
                ArgNames           = new[] { "InstanceID", "Channel", "DesiredMute" },
                Name               = CsActionSetMute,
                ExpectedReplyCount = 0
            };

            await InvokeActionAsync(action, loIn);
        }
示例#2
0
        /// <summary>
        ///     Executes the GetMute action.
        /// </summary>
        /// <param name="instanceId">In value for the InstanceID action parameter.</param>
        /// <param name="channel">In value for the Channel action parameter.</param>
        /// <returns>Out value for the CurrentMute action parameter.</returns>
        public async Task <ActionResult> GetMute(UInt32 instanceId, AargtypeMuteChannelEnum channel)
        {
            var loIn = new object[2];

            loIn[0] = instanceId;
            loIn[1] = RenderingControlExtensions.ToStringAargtypeMuteChannel(channel);

            var action = new SoapAction
            {
                ArgNames           = new[] { "InstanceID", "Channel" },
                Name               = CsActionGetMute,
                ExpectedReplyCount = 1
            };
            SoapActionResult result = await InvokeActionAsync(action, loIn);

            // TODO: check for execption
            return(new ActionResult(result.XElement));
        }