Class DisplayOptions

Service that is used to register DisplayOptions

Inheritance
System.Object
DisplayOptions
Implements
System.Collections.Generic.IEnumerable<DisplayOption>
System.Collections.IEnumerable
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: 8.11.0
Syntax
[ServiceConfiguration(typeof(DisplayOptions), Lifecycle = ServiceInstanceScope.Singleton)]
[InitializableModule]
public class DisplayOptions : IInitializableModule, IEnumerable<DisplayOption>, IEnumerable

Constructors

DisplayOptions()

Initializes a new instance of the DisplayOptions class.

Declaration
public DisplayOptions()

Methods

Add(DisplayOption)

Add a display option

Declaration
public virtual DisplayOptions Add(DisplayOption displayOption)
Parameters
Type Name Description
DisplayOption displayOption

The display option to add

Returns
Type Description
DisplayOptions
Exceptions
Type Condition
System.ArgumentNullException

Thrown if the display options is null

System.ArgumentException

A display option with the same id allready exists

Add(String, String, String)

Add a new display option

Declaration
public virtual DisplayOptions Add(string id, string name, string tag)
Parameters
Type Name Description
System.String id

Unique identifier for the option

System.String name

Name of the display option to add, if a language resource key is specified it will be automatically translated

System.String tag

The rendering tag to apply when the option has been selected

Returns
Type Description
DisplayOptions

Add(String, String, String, String)

Add a new display option

Declaration
public virtual DisplayOptions Add(string id, string name, string tag, string description)
Parameters
Type Name Description
System.String id

Unique identifier for the option

System.String name

Name of the display option to add, if a language resource key is specified it will be automatically translated

System.String tag

The rendering tag to apply when the option has been selected

System.String description

Description for the option

Returns
Type Description
DisplayOptions

Add(String, String, String, String, String)

Add a new display option

Declaration
public virtual DisplayOptions Add(string id, string name, string tag, string description, string iconClass)
Parameters
Type Name Description
System.String id

Unique identifier for the option

System.String name

Name of the display option to add, if a language resource key is specified it will be automatically translated

System.String tag

The rendering tag to apply when the option has been selected

System.String description

Description for the option

System.String iconClass

Css class for the icon that is used in the display option selector

Returns
Type Description
DisplayOptions

Get(String)

Gets the display options with the specified id

Declaration
public virtual DisplayOption Get(string id)
Parameters
Type Name Description
System.String id

The id if the option to get.

Returns
Type Description
DisplayOption

DisplayOption or null

GetEnumerator()

Declaration
public IEnumerator<DisplayOption> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<DisplayOption>

Initialize(ITypeScannerLookup, IServiceLocator)

Initializes a new instance of the DisplayOptions class.

Declaration
protected virtual void Initialize(ITypeScannerLookup typeScanner, IServiceLocator serviceLocator)
Parameters
Type Name Description
ITypeScannerLookup typeScanner

The type scanner.

IServiceLocator serviceLocator

The service locator.

Remove(String)

Removes the DisplayOption with the specified id

Declaration
public virtual void Remove(string id)
Parameters
Type Name Description
System.String id

The id if the display option to remove.

Explicit Interface Implementations

IInitializableModule.Initialize(InitializationEngine)

Declaration
void IInitializableModule.Initialize(InitializationEngine context)
Parameters
Type Name Description
InitializationEngine context

IInitializableModule.Uninitialize(InitializationEngine)

Declaration
void IInitializableModule.Uninitialize(InitializationEngine context)
Parameters
Type Name Description
InitializationEngine context

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Implements

System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

Extension Methods