C# 클래스 Sdl.Web.Common.Models.EntityModel

Abstract base class for View Models for Entities.
상속: ViewModel, IRichTextFragment, IEntity
파일 보기 프로젝트 열기: sdl/dxa-web-application-dotnet 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
DeepCopy ( ) : ViewModel

Creates a deep copy of this View Model.

Equals ( object obj ) : bool

Determines whether the specified object is equal to the current Entity Model.

GetDefaultView ( Sdl.Web.Common.Configuration.Localization localization ) : MvcData

Gets the default View for this Entity Model (if any).

If this method is overridden in a subclass, it will be possible to render "embedded" Entity Models of that type using the Html.DxaEntity method.

GetHashCode ( ) : int

Serves as a hash function for a particular type.

GetXpmMarkup ( Sdl.Web.Common.Configuration.Localization localization ) : string

Gets the rendered XPM markup

ToHtml ( ) : string

Gets an HTML representation of the Entity Model.

This method is used when the EntityModel is part of a RichText instance which is mapped to a string property. In this case HTML rendering happens during model mapping (by means of this method), which is not ideal. Preferably, the model property should be of type RichText and the View should use @Html.DxaRichText() to get the rich text rendered as HTML.

ToString ( ) : string

Returns a string that represents the current object.

메소드 상세

DeepCopy() 공개 메소드

Creates a deep copy of this View Model.
public DeepCopy ( ) : ViewModel
리턴 ViewModel

Equals() 공개 메소드

Determines whether the specified object is equal to the current Entity Model.
public Equals ( object obj ) : bool
obj object The object to compare with the current object.
리턴 bool

GetDefaultView() 공개 메소드

Gets the default View for this Entity Model (if any).
If this method is overridden in a subclass, it will be possible to render "embedded" Entity Models of that type using the Html.DxaEntity method.
public GetDefaultView ( Sdl.Web.Common.Configuration.Localization localization ) : MvcData
localization Sdl.Web.Common.Configuration.Localization The context Localization.
리턴 MvcData

GetHashCode() 공개 메소드

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
리턴 int

GetXpmMarkup() 공개 메소드

Gets the rendered XPM markup
public GetXpmMarkup ( Sdl.Web.Common.Configuration.Localization localization ) : string
localization Sdl.Web.Common.Configuration.Localization The context Localization.
리턴 string

ToHtml() 공개 메소드

Gets an HTML representation of the Entity Model.
This method is used when the EntityModel is part of a RichText instance which is mapped to a string property. In this case HTML rendering happens during model mapping (by means of this method), which is not ideal. Preferably, the model property should be of type RichText and the View should use @Html.DxaRichText() to get the rich text rendered as HTML.
/// This method must be overridden in a concrete subclass which is to be embedded in rich text. /// For example, see . ///
public ToHtml ( ) : string
리턴 string

ToString() 공개 메소드

Returns a string that represents the current object.
public ToString ( ) : string
리턴 string