November Happy Hour will be moved to Thursday December 5th.

Class DefaultDisplayChannelService

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Service that handles DisplayChannel instances.

Inheritance
System.Object
DefaultDisplayChannelService
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.Internal
Assembly: EPiServer.dll
Version: 10.10.4
Syntax
public class DefaultDisplayChannelService : IDisplayChannelService

Constructors

DefaultDisplayChannelService()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the DefaultDisplayChannelService class.

Declaration
public DefaultDisplayChannelService()

Properties

Channels

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets all registered channels.

Declaration
public virtual IList<DisplayChannel> Channels { get; }
Property Value
Type Description
System.Collections.Generic.IList<DisplayChannel>

The channels.

EditPath

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the edit path Sets the edit path. Main purpose forusing it in tests.

Declaration
[Obsolete("Not used any longer")]
public string EditPath { get; set; }
Property Value
Type Description
System.String

Methods

GetActiveChannels(HttpContextBase)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets all DisplayChannel instances that are considered active for specified context.

Declaration
public virtual IEnumerable<DisplayChannel> GetActiveChannels(HttpContextBase context)
Parameters
Type Name Description
System.Web.HttpContextBase context

The context.

Returns
Type Description
System.Collections.Generic.IEnumerable<DisplayChannel>

RegisterDisplayMode(IDisplayMode)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Registers an System.Web.WebPages.IDisplayMode instance as an DisplayChannel.

Declaration
public virtual void RegisterDisplayMode(IDisplayMode displayMode)
Parameters
Type Name Description
System.Web.WebPages.IDisplayMode displayMode

The display mode.

Examples
  The following example shows the registration of a simple channel for MVC that is active for mobile request.
        public void Initialize(EPiServer.Framework.Initialization.InitializationEngine context)
{
context.Locate.DisplayChannelService()
    .RegisterDisplayMode(new DefaultDisplayMode(RenderingTags.Mobile)
{
    ContextCondition = (r) => r.Request.Browser.IsMobileDevice
});
}

RegisterDisplayMode(IDisplayMode, Int32)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Registers an System.Web.WebPages.IDisplayMode instance as an DisplayChannel.

Declaration
public virtual void RegisterDisplayMode(IDisplayMode displayMode, int index)
Parameters
Type Name Description
System.Web.WebPages.IDisplayMode displayMode

The display mode.

System.Int32 index

The index of where the instance is registered.

Examples
  The following example shows the registration of a simple channel for MVC that is active for mobile request.
        public void Initialize(EPiServer.Framework.Initialization.InitializationEngine context)
{
context.Locate.DisplayChannelService()
    .RegisterDisplayMode(new DefaultDisplayMode(RenderingTags.Mobile)
{
    ContextCondition = (r) => r.Request.Browser.IsMobileDevice
});
}

RegisterDisplayMode(IDisplayMode, Int32, String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Registers an System.Web.WebPages.IDisplayMode instance as an DisplayChannel.

Declaration
public virtual void RegisterDisplayMode(IDisplayMode displayMode, int index, string resolutionId)
Parameters
Type Name Description
System.Web.WebPages.IDisplayMode displayMode

The display mode.

System.Int32 index

The index of where the instance is registered.

System.String resolutionId

The resolution id.

Examples
  The following example shows the registration of a simple channel for MVC that is active for mobile request.
        public void Initialize(EPiServer.Framework.Initialization.InitializationEngine context)
{
context.Locate.DisplayChannelService()
    .RegisterDisplayMode(new DefaultDisplayMode(RenderingTags.Mobile)
{
    ContextCondition = (r) => r.Request.Browser.IsMobileDevice
});
}

Implements

Extension Methods