SaaS CMS has officially launched! Learn more now.

Class PersonalizedViewSettings

Contains personalized settings for a view for a certain user.

Inheritance
System.Object
PersonalizedViewSettings
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.Shell.ViewComposition
Assembly: EPiServer.Shell.dll
Version: 8.11.0
Syntax
public class PersonalizedViewSettings

Constructors

PersonalizedViewSettings()

Initializes a new instance of the PersonalizedViewSettings class.

Declaration
public PersonalizedViewSettings()

Properties

CustomizedContainers

Gets or sets the containers that has been customized by the user.

Declaration
public IList<IContainer> CustomizedContainers { get; }
Property Value
Type Description
System.Collections.Generic.IList<IContainer>

The containers that has been customized by the user.

Id

Id for the personalized settings.

Declaration
public Guid Id { get; set; }
Property Value
Type Description
System.Guid

UserName

Gets or sets the username for these settings.

Declaration
public string UserName { get; set; }
Property Value
Type Description
System.String

The username for these settings.

ViewName

Gets or sets the name of the view.

Declaration
public string ViewName { get; set; }
Property Value
Type Description
System.String

The name of the view.

Methods

FindComponentById(IEnumerable<PersonalizedViewSettings>, Guid)

Locates a ComponentData by its id within a collection of PersonalizedViewSettings.

Declaration
public static IComponent FindComponentById(IEnumerable<PersonalizedViewSettings> viewSettings, Guid componentId)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<PersonalizedViewSettings> viewSettings

The collection of view settings in which to search for the component.

System.Guid componentId

The id of the component to locate.

Returns
Type Description
IComponent

A ComponentData settings object if a natch was found; otherwies null

FindComponentById(IEnumerable<PersonalizedViewSettings>, Guid, out PersonalizedViewSettings)

Locates a ComponentData by its id within a collection of PersonalizedViewSettings.

Declaration
public static IComponent FindComponentById(IEnumerable<PersonalizedViewSettings> viewSettings, Guid componentId, out PersonalizedViewSettings settings)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<PersonalizedViewSettings> viewSettings

The collection of view settings in which to search for the component.

System.Guid componentId

The id of the component to locate.

PersonalizedViewSettings settings

The view settings in which the component was found.

Returns
Type Description
IComponent

A ComponentData settings object if a natch was found; otherwies null

FindComponentById(Guid, out IContainer)

Finds the container that matches the given id or null if no matching container exists.

Declaration
public IComponent FindComponentById(Guid id, out IContainer personalizationContainer)
Parameters
Type Name Description
System.Guid id

The id to match.

IContainer personalizationContainer

The personalization container that the component exists in if one exists.

Returns
Type Description
IComponent

The component that matches the given id or null if no matching container exists.

GetComponent(IEnumerable<IComponent>, Guid)

Returns a ComponentData of a component with storedComponentId from the containers collection

Declaration
public static IComponent GetComponent(IEnumerable<IComponent> containers, Guid storedComponentId)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IComponent> containers

The containers.

System.Guid storedComponentId

The stored component id to search for

Returns
Type Description
IComponent