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

Class TabDefinitionRepository

A repository for the TabDefinition class.

Inheritance
System.Object
TabDefinitionRepository
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.DataAbstraction
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
[ServiceConfiguration(ServiceType = typeof(ITabDefinitionRepository))]
public class TabDefinitionRepository : ITabDefinitionRepository, ICachedRepository

Constructors

TabDefinitionRepository(ServiceAccessor<TabInfoDB>)

Initializes a new instance of the TabDefinitionRepository class.

Declaration
[Obsolete("Use another constructor")]
public TabDefinitionRepository(ServiceAccessor<TabInfoDB> dataAccess)
Parameters
Type Name Description
ServiceAccessor<TabInfoDB> dataAccess

The data access.

TabDefinitionRepository(ServiceAccessor<TabInfoDB>, ISynchronizedObjectInstanceCache)

Initializes a new instance of the TabDefinitionRepository class.

Declaration
public TabDefinitionRepository(ServiceAccessor<TabInfoDB> dataAccess, ISynchronizedObjectInstanceCache cacheInstance)
Parameters
Type Name Description
ServiceAccessor<TabInfoDB> dataAccess

The data access.

ISynchronizedObjectInstanceCache cacheInstance

The cache.

Methods

ClearCache()

Clear cache.

Declaration
public virtual void ClearCache()

Delete(TabDefinition)

Deletes a tab definition

Declaration
public virtual void Delete(TabDefinition tabDefinition)
Parameters
Type Name Description
TabDefinition tabDefinition

The tab definition that will be deleted

Delete(TabDefinition, Int32)

Deletes a tab definition and replaces any references to this tab with the specified tab.

Declaration
public virtual void Delete(TabDefinition tabDefinition, int replaceWithTabDefinition)
Parameters
Type Name Description
TabDefinition tabDefinition

The tab definition that should be persisted.

System.Int32 replaceWithTabDefinition

Replace existing references with tab

GetDependentPropertyNames(Int32)

List all dependent properties for a specified tab

Declaration
public virtual IEnumerable<string> GetDependentPropertyNames(int tabId)
Parameters
Type Name Description
System.Int32 tabId

The key for the tab

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

A list of all property names found on the specified tab

List()

List all defined tabs

Declaration
public virtual IEnumerable<TabDefinition> List()
Returns
Type Description
System.Collections.Generic.IEnumerable<TabDefinition>

A collection of types

Load(Int32)

Load a tab based on identifier

Declaration
public virtual TabDefinition Load(int id)
Parameters
Type Name Description
System.Int32 id

The tab identifier

Returns
Type Description
TabDefinition

A tab or null if not found

Load(String)

Load a tab based on name

Declaration
public virtual TabDefinition Load(string name)
Parameters
Type Name Description
System.String name

The tab name

Returns
Type Description
TabDefinition

A tab or null if not found

Merge(TabDefinition)

Merge the TabDefinition from Db and Code.

Declaration
protected virtual void Merge(TabDefinition tabDefinition)
Parameters
Type Name Description
TabDefinition tabDefinition

tabDefinition

OnTabDefinitionDeleted(EventArgs)

Raises the TabDefinitionDeleted event.

Declaration
protected virtual void OnTabDefinitionDeleted(EventArgs args)
Parameters
Type Name Description
System.EventArgs args

The System.EventArgs instance containing the event data.

OnTabDefinitionSaved(EventArgs)

Raises the TabDefinitionSaved event.

Declaration
protected virtual void OnTabDefinitionSaved(EventArgs args)
Parameters
Type Name Description
System.EventArgs args

The System.EventArgs instance containing the event data.

Save(TabDefinition)

Stores or updates a specified tab definition in the repository.

Declaration
public virtual void Save(TabDefinition tabDefinition)
Parameters
Type Name Description
TabDefinition tabDefinition

The tab definition that will be deleted

Events

TabDefinitionDeleted

Occurs when a TabDefinition has been deleted.

Declaration
public static event EventHandler<EventArgs> TabDefinitionDeleted
Event Type
Type Description
System.EventHandler<System.EventArgs>

TabDefinitionSaved

Occurs when a TabDefinition has been saved, i.e. created or updated.

Declaration
public static event EventHandler<EventArgs> TabDefinitionSaved
Event Type
Type Description
System.EventHandler<System.EventArgs>

Implements

Extension Methods