C# Class Sdl.Web.Tridion.Mapping.ModelBuilderPipeline

Represents a pipeline/chain of configured Strongly Typed View Model Builders (DD4T-based).
Each Model Builder in the pipeline is invoked and has the possibility to modify the resulting Page/Entity Model. The first Model Builder has to construct the View Models (it will get in null). Normally, the DefaultModelBuilder will be the first and only one. NOTE: The Model Builder pipeline is not a public extension point; it should only be used for advanced (SDL-owned) modules like the SmartTarget module.
ファイルを表示 Open project: sdl/dxa-web-application-dotnet Class Usage Examples

Public Methods

Method Description
CreateEntityModel ( IComponent component, Type baseModelType, Sdl.Web.Common.Configuration.Localization localization ) : EntityModel

Creates a Strongly Typed Entity Model for a given DD4T Component.

CreateEntityModel ( IComponentPresentation cp, Sdl.Web.Common.Configuration.Localization localization ) : EntityModel

Creates a Strongly Typed Entity Model for a given DD4T Component Presentation.

CreatePageModel ( DD4T.ContentModel.IPage page, DD4T.ContentModel.IPage includes, Sdl.Web.Common.Configuration.Localization localization ) : PageModel

Creates a Strongly Typed Page Model for a given DD4T Page and an optional set of include Pages.

Private Methods

Method Description
ModelBuilderPipeline ( ) : System

Initializes the Model Builder Pipeline (class constructor).

Method Details

CreateEntityModel() public static method

Creates a Strongly Typed Entity Model for a given DD4T Component.
public static CreateEntityModel ( IComponent component, Type baseModelType, Sdl.Web.Common.Configuration.Localization localization ) : EntityModel
component IComponent The DD4T Component.
baseModelType System.Type The (base) type for the Entity Model.
localization Sdl.Web.Common.Configuration.Localization The context .
return Sdl.Web.Common.Models.EntityModel

CreateEntityModel() public static method

Creates a Strongly Typed Entity Model for a given DD4T Component Presentation.
public static CreateEntityModel ( IComponentPresentation cp, Sdl.Web.Common.Configuration.Localization localization ) : EntityModel
cp IComponentPresentation The DD4T Component Presentation.
localization Sdl.Web.Common.Configuration.Localization The context .
return Sdl.Web.Common.Models.EntityModel

CreatePageModel() public static method

Creates a Strongly Typed Page Model for a given DD4T Page and an optional set of include Pages.
public static CreatePageModel ( DD4T.ContentModel.IPage page, DD4T.ContentModel.IPage includes, Sdl.Web.Common.Configuration.Localization localization ) : PageModel
page DD4T.ContentModel.IPage The DD4T Page object.
includes DD4T.ContentModel.IPage The set of DD4T Page object for include pages. Can be null.
localization Sdl.Web.Common.Configuration.Localization The context .
return Sdl.Web.Common.Models.PageModel