Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IPublishedModelFactory

    Provides the published model creation service.

    Namespace: Umbraco.Cms.Core.Models.PublishedContent
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IPublishedModelFactory

    Methods

    View Source

    CreateModel(IPublishedElement)

    Creates a strongly-typed model representing a published element.

    Declaration
    IPublishedElement CreateModel(IPublishedElement element)
    Parameters
    Type Name Description
    IPublishedElement element

    The original published element.

    Returns
    Type Description
    IPublishedElement

    The strongly-typed model representing the published element, or the published element itself it the factory has no model for the corresponding element type.

    View Source

    CreateModelList(String)

    Creates a List{T} of a strongly-typed model for a model type alias.

    Declaration
    IList CreateModelList(string alias)
    Parameters
    Type Name Description
    System.String alias

    The model type alias.

    Returns
    Type Description
    System.Collections.IList

    A List{T} of the strongly-typed model, exposed as an IList.

    View Source

    GetModelType(String)

    Gets the Type of a strongly-typed model for a model type alias.

    Declaration
    Type GetModelType(string alias)
    Parameters
    Type Name Description
    System.String alias

    The model type alias.

    Returns
    Type Description
    Type

    The type of the strongly-typed model.

    View Source

    MapModelType(Type)

    Maps a CLR type that may contain model types, to an actual CLR type.

    Declaration
    Type MapModelType(Type type)
    Parameters
    Type Name Description
    Type type

    The CLR type.

    Returns
    Type Description
    Type

    The actual CLR type.

    Remarks

    See ModelType for more details.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • CreateModel(IPublishedElement)
      • CreateModelList(String)
      • GetModelType(String)
      • MapModelType(Type)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX