Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IEntityXmlSerializer

    Serializes entities to XML

    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IEntityXmlSerializer

    Methods

    View Source

    Serialize(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

    View Source

    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

    View Source

    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

    View Source

    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.

    View Source

    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 true, serializes the published version; otherwise serializes the draft version.

    bool withDescendants

    If true, includes all descendant content items in the serialization.

    Returns
    Type Description
    XElement

    An System.Xml.Linq.XElement containing the XML representation of the content item.

    View Source

    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.

    View Source

    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.

    View Source

    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

    View Source

    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.

    View Source

    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 true, includes all descendant media items in the serialization.

    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.

    View Source

    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.

    View Source

    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.

    View Source

    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.

    View Source

    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 true, includes the stylesheet's properties in the serialization.

    Returns
    Type Description
    XElement

    An System.Xml.Linq.XElement containing the XML representation of the stylesheet.

    View Source

    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.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX