Esempio n. 1
0
 /// <summary>
 /// Write the element, the <paramref name="text"/> content (if any) supplied and any <paramref name="attributes"/> supplied.
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="elementName">The name of the element whose start tag is to be written</param>
 /// <param name="text">an object whose <see cref="Object.ToString"/> method will be called to provide the text content (optional)</param>
 /// <param name="attributes">An anonymous object whose properties will be added as attribute name/value pairs (optional)</param>
 public static void WriteElement(this XmlTextWriter writer, XName elementName, object text, object attributes)
 {
     writer.WriteBeginElement(elementName, text, attributes).Dispose();
 }