コード例 #1
0
ファイル: UPNP.cs プロジェクト: tngraf/UPnP
        } // 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()
コード例 #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()
コード例 #3
0
ファイル: UpnpServiceAction.cs プロジェクト: tngraf/UPnP
        } // 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()