C# Class Sdl.Web.Common.Models.ViewModel

Abstract base class for all (strongly typed) View Models
ファイルを表示 Open project: sdl/dxa-web-application-dotnet Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
DeepCopy ( ) : ViewModel

Creates a deep copy of this View Model.

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

Gets the rendered XPM markup

SetExtensionData ( string key, object value ) : void

Sets an extension data key/value pair.

This convenience method ensures the ExtensionData dictionary is initialized before setting the key/value pair.

Protected Methods

Method Description
ConcatenateSyndicationFeedItems ( IEnumerable feedItemProviders, Sdl.Web.Common.Configuration.Localization localization ) : IEnumerable

Concatenates all syndication feed items provided by a given set of feed item providers.

CreateSyndicationItem ( string title, object summary, Link link, DateTime publishDate, Sdl.Web.Common.Configuration.Localization localization ) : SyndicationItem

Creates a syndication feed item based on essential data.

CreateSyndicationLink ( Link link, Sdl.Web.Common.Configuration.Localization localization ) : SyndicationLink

Creates a syndication item link from a given Link instance.

Method Details

ConcatenateSyndicationFeedItems() protected method

Concatenates all syndication feed items provided by a given set of feed item providers.
protected ConcatenateSyndicationFeedItems ( IEnumerable feedItemProviders, Sdl.Web.Common.Configuration.Localization localization ) : IEnumerable
feedItemProviders IEnumerable The set of feed item providers.
localization Sdl.Web.Common.Configuration.Localization The context .
return IEnumerable

CreateSyndicationItem() protected method

Creates a syndication feed item based on essential data.
protected CreateSyndicationItem ( string title, object summary, Link link, DateTime publishDate, Sdl.Web.Common.Configuration.Localization localization ) : SyndicationItem
title string The title.
summary object The summary. Can be a string or a instance.
link Link The link.
publishDate DateTime The date/time this item was published/created. If null, publish date is not included in the feed.
localization Sdl.Web.Common.Configuration.Localization The context .
return SyndicationItem

CreateSyndicationLink() protected method

Creates a syndication item link from a given Link instance.
protected CreateSyndicationLink ( Link link, Sdl.Web.Common.Configuration.Localization localization ) : SyndicationLink
link Link The instance.
localization Sdl.Web.Common.Configuration.Localization The context .
return SyndicationLink

DeepCopy() public method

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

GetXpmMarkup() public abstract method

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

SetExtensionData() public method

Sets an extension data key/value pair.
This convenience method ensures the ExtensionData dictionary is initialized before setting the key/value pair.
public SetExtensionData ( string key, object value ) : void
key string The key for the extension data.
value object The value.
return void