BlogML.BlogMLWriterBase.WriteContent C# (CSharp) Method

WriteContent() protected method

protected WriteContent ( string elementName, BlogMLContent content ) : void
elementName string
content BlogML.Xml.BlogMLContent
return void
        protected void WriteContent(string elementName, BlogMLContent content)
        {
            WriteStartElement(elementName);
            string contentType = (Enum.GetName(typeof(ContentTypes), content.ContentType) ?? "text").ToLowerInvariant();
            WriteAttributeString("type", contentType);
            Writer.WriteCData(content.Text ?? string.Empty);
            WriteEndElement();
        }