} // 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()
} // 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()
} // 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()