Exemple #1
0
        } // ParseAction()

        /// <summary>
        /// Parses the argument.
        /// </summary>
        /// <param name="element">The element.</param>
        /// <returns>A <see cref="UpnpArgument"/> object.</returns>
        private static UpnpArgument ParseArgument(XContainer element)
        {
            var argument = new UpnpArgument();

            argument.Name                 = XmlSupport.GetFirstSubNodeValue(element, "name");
            argument.Direction            = XmlSupport.GetFirstSubNodeValue(element, "direction");
            argument.RelatedStateVariable =
                XmlSupport.GetFirstSubNodeValue(element, "relatedStateVariable");
            argument.ReturnValue =
                XmlSupport.GetFirstSubNodeValue(element, "retVal", false);
            return(argument);
        } // ParseArgument()
Exemple #2
0
        } // UpnpService()

        #endregion // CONSTRUCTION

        //// ---------------------------------------------------------------------

        #region PUBLIC METHODS
        /// <summary>
        /// Gets the information about the given variable.
        /// </summary>
        /// <param name="argument">The argument.</param>
        /// <returns>A <see cref="UpnpStateVariable"/> object.</returns>
        public UpnpStateVariable GetVariableInfo(UpnpArgument argument)
        {
            return(this.stateVariables.FirstOrDefault(
                       variable => argument.RelatedStateVariable.Equals(variable.Name, StringComparison.OrdinalIgnoreCase)));
        } // GetVariableInfo()
Exemple #3
0
        } // UpnpServiceAction()

        #endregion // CONSTRUCTION

        //// ---------------------------------------------------------------------

        #region PUBLIC METHODS
        /// <summary>
        /// Adds the argument.
        /// </summary>
        /// <param name="argument">The argument.</param>
        public void AddArgument(UpnpArgument argument)
        {
            this.arguments.Add(argument);
        } // AddArgument()