Try our conversational search powered by Generative AI!

Class DisplayModeChannel

A DisplayChannel implementation that wraps a System.Web.WebPages.IDisplayMode instance.

Inheritance
System.Object
DisplayModeChannel
Implements
System.Web.WebPages.IDisplayMode
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
public class DisplayModeChannel : DisplayChannel, IDisplayMode

Constructors

DisplayModeChannel(IDisplayMode)

Initializes a new instance of the DisplayModeChannel class.

Declaration
public DisplayModeChannel(IDisplayMode displayMode)
Parameters
Type Name Description
System.Web.WebPages.IDisplayMode displayMode

The display mode.

DisplayModeChannel(IDisplayMode, String)

Initializes a new instance of the DisplayModeChannel class.

Declaration
public DisplayModeChannel(IDisplayMode displayMode, string resolutionId)
Parameters
Type Name Description
System.Web.WebPages.IDisplayMode displayMode

The display mode.

System.String resolutionId

The resolution id.

Properties

ChannelName

Gets the name of the channel.

Declaration
public override string ChannelName { get; }
Property Value
Type Description
System.String

The name of the channel.

Overrides
Remarks

When a DisplayChannel is active then when resolving which TemplateModel (e.g. an page or user control) that should be used to render a request, models where ChannelName have a matching entry in Tags will be prefered.

DisplayMode

Exposes the wrapped System.Web.WebPages.IDisplayMode instance.

Declaration
public virtual IDisplayMode DisplayMode { get; }
Property Value
Type Description
System.Web.WebPages.IDisplayMode

The display mode.

ResolutionId

Gets the resolution.

Declaration
public override string ResolutionId { get; }
Property Value
Type Description
System.String
Overrides
Remarks

Default value is null meaning channel has no preferred resolution.

Methods

IsActive(HttpContextBase)

Determines whether the specified channel is active given the specified context.

Declaration
public override bool IsActive(HttpContextBase context)
Parameters
Type Name Description
System.Web.HttpContextBase context

The context.

Returns
Type Description
System.Boolean

true if the specified channel is active; otherwise, false.

Overrides
Remarks

The call will be delegated to the wrapped System.Web.WebPages.IDisplayMode.CanHandleContext(System.Web.HttpContextBase)

Implements

System.Web.WebPages.IDisplayMode

Extension Methods