Interface IEntityXmlSerializer
Serializes entities to XML
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public interface IEntityXmlSerializer
Methods
View SourceSerialize(IEnumerable<IDataType>)
Exports a list of Data Types
Declaration
XElement Serialize(IEnumerable<IDataType> dataTypeDefinitions)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IDataType> | dataTypeDefinitions | List of data types to export |
Returns
| Type | Description |
|---|---|
| XElement | System.Xml.Linq.XElement containing the xml representation of the IDataTypeDefinition objects |
Serialize(IEnumerable<IDictionaryItem>, bool)
Exports a list of IDictionaryItem items to xml as an System.Xml.Linq.XElement
Declaration
XElement Serialize(IEnumerable<IDictionaryItem> dictionaryItem, bool includeChildren = true)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IDictionaryItem> | dictionaryItem | List of dictionary items to export |
| bool | includeChildren | Optional boolean indicating whether or not to include children |
Returns
| Type | Description |
|---|---|
| XElement | System.Xml.Linq.XElement containing the xml representation of the IDictionaryItem objects |
Serialize(IEnumerable<ILanguage>)
Exports a list of ILanguage items to xml as an System.Xml.Linq.XElement
Declaration
XElement Serialize(IEnumerable<ILanguage> languages)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<ILanguage> | languages | List of Languages to export |
Returns
| Type | Description |
|---|---|
| XElement | System.Xml.Linq.XElement containing the xml representation of the ILanguage objects |
Serialize(IEnumerable<ITemplate>)
Exports a list of ITemplate items to XML as an System.Xml.Linq.XElement.
Declaration
XElement Serialize(IEnumerable<ITemplate> templates)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<ITemplate> | templates | The collection of templates to serialize. |
Returns
| Type | Description |
|---|---|
| XElement | An System.Xml.Linq.XElement containing the XML representation of all templates. |
Serialize(IContent, bool, bool)
Exports an IContent item as an System.Xml.Linq.XElement.
Declaration
XElement Serialize(IContent content, bool published, bool withDescendants = false)
Parameters
| Type | Name | Description |
|---|---|---|
| IContent | content | The content item to serialize. |
| bool | published | If |
| bool | withDescendants | If |
Returns
| Type | Description |
|---|---|
| XElement | An System.Xml.Linq.XElement containing the XML representation of the content item. |
Serialize(IContentType)
Exports an IContentType to an System.Xml.Linq.XElement.
Declaration
XElement Serialize(IContentType contentType)
Parameters
| Type | Name | Description |
|---|---|---|
| IContentType | contentType | The content type to serialize. |
Returns
| Type | Description |
|---|---|
| XElement | An System.Xml.Linq.XElement containing the XML representation of the content type. |
Serialize(IDataType)
Exports a single IDataType to an System.Xml.Linq.XElement.
Declaration
XElement Serialize(IDataType dataType)
Parameters
| Type | Name | Description |
|---|---|---|
| IDataType | dataType | The data type to serialize. |
Returns
| Type | Description |
|---|---|
| XElement | An System.Xml.Linq.XElement containing the XML representation of the data type. |
Serialize(IDictionaryItem, bool)
Exports a single IDictionaryItem item to xml as an System.Xml.Linq.XElement
Declaration
XElement Serialize(IDictionaryItem dictionaryItem, bool includeChildren)
Parameters
| Type | Name | Description |
|---|---|---|
| IDictionaryItem | dictionaryItem | Dictionary Item to export |
| bool | includeChildren | Optional boolean indicating whether or not to include children |
Returns
| Type | Description |
|---|---|
| XElement | System.Xml.Linq.XElement containing the xml representation of the IDictionaryItem object |
Serialize(ILanguage)
Exports a single ILanguage to an System.Xml.Linq.XElement.
Declaration
XElement Serialize(ILanguage language)
Parameters
| Type | Name | Description |
|---|---|---|
| ILanguage | language | The language to serialize. |
Returns
| Type | Description |
|---|---|
| XElement | An System.Xml.Linq.XElement containing the XML representation of the language. |
Serialize(IMedia, bool, Action<IMedia, XElement>?)
Exports an IMedia item as an System.Xml.Linq.XElement.
Declaration
XElement Serialize(IMedia media, bool withDescendants = false, Action<IMedia, XElement>? onMediaItemSerialized = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IMedia | media | The media item to serialize. |
| bool | withDescendants | If |
| Action<IMedia, XElement> | onMediaItemSerialized | Optional callback action invoked after each media item is serialized. |
Returns
| Type | Description |
|---|---|
| XElement | An System.Xml.Linq.XElement containing the XML representation of the media item. |
Serialize(IMediaType)
Exports an IMediaType to an System.Xml.Linq.XElement.
Declaration
XElement Serialize(IMediaType mediaType)
Parameters
| Type | Name | Description |
|---|---|---|
| IMediaType | mediaType | The media type to serialize. |
Returns
| Type | Description |
|---|---|
| XElement | An System.Xml.Linq.XElement containing the XML representation of the media type. |
Serialize(IMember)
Exports an IMember item as an System.Xml.Linq.XElement.
Declaration
XElement Serialize(IMember member)
Parameters
| Type | Name | Description |
|---|---|---|
| IMember | member | The member to serialize. |
Returns
| Type | Description |
|---|---|
| XElement | An System.Xml.Linq.XElement containing the XML representation of the member. |
Serialize(IMemberType)
Exports an IMemberType to an System.Xml.Linq.XElement.
Declaration
XElement Serialize(IMemberType memberType)
Parameters
| Type | Name | Description |
|---|---|---|
| IMemberType | memberType | The member type to serialize. |
Returns
| Type | Description |
|---|---|
| XElement | An System.Xml.Linq.XElement containing the XML representation of the member type. |
Serialize(IStylesheet, bool)
Exports an IStylesheet to an System.Xml.Linq.XElement.
Declaration
XElement Serialize(IStylesheet stylesheet, bool includeProperties)
Parameters
| Type | Name | Description |
|---|---|---|
| IStylesheet | stylesheet | The stylesheet to serialize. |
| bool | includeProperties | If |
Returns
| Type | Description |
|---|---|
| XElement | An System.Xml.Linq.XElement containing the XML representation of the stylesheet. |
Serialize(ITemplate)
Exports a single ITemplate to an System.Xml.Linq.XElement.
Declaration
XElement Serialize(ITemplate template)
Parameters
| Type | Name | Description |
|---|---|---|
| ITemplate | template | The template to serialize. |
Returns
| Type | Description |
|---|---|
| XElement | An System.Xml.Linq.XElement containing the XML representation of the template. |