Пример #1
0
 /// <summary>
 /// Creates a member element from the name and the value content element.
 /// </summary>
 /// <param name="name">The name of the member.</param>
 /// <param name="value">The value XmlRpcType.</param>
 /// <typeparam name="T">The XmlRpType's base type.</typeparam>
 /// <returns>The member element with the given name and value content.</returns>
 protected static XElement makeMemberElement <T>(string name, XmlRpcType <T> value)
 {
     return(new XElement(XName.Get(XmlRpcElements.StructMemberElement), makeNameXElement(name), value.GenerateXml()));
 }
Пример #2
0
 /// <summary>
 /// Creates a param-Element with the given XmlRpcType's value as content.
 /// </summary>
 /// <typeparam name="T">The type of the value.</typeparam>
 /// <param name="value">The XmlRpcType to be wrapped.</param>
 /// <returns>A param-Element containing the value as content.</returns>
 protected static XElement makeParamElement <T>(XmlRpcType <T> value)
 {
     return(new XElement(XName.Get(XmlRpcElements.ParamElement), value.GenerateXml()));
 }