Class TabDefinitionRepository
A repository for the Tab
Inheritance
Namespace: EPiServer.DataAbstraction.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration(ServiceType = null)]
public class TabDefinitionRepository : Object, ITabDefinitionRepository, ICachedRepository
Constructors
TabDefinitionRepository(ServiceAccessor<TabInfoDB>, ISynchronizedObjectInstanceCache)
Initializes a new instance of the Tab
Declaration
public TabDefinitionRepository(ServiceAccessor<TabInfoDB> dataAccess, ISynchronizedObjectInstanceCache cacheInstance)
Parameters
Type | Name | Description |
---|---|---|
Service |
dataAccess | The data access. |
ISynchronized |
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 |
---|---|---|
Tab |
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 |
---|---|---|
Tab |
tabDefinition | The tab definition that should be persisted. |
System. |
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. |
tabId | The key for the tab |
Returns
Type | Description |
---|---|
System. |
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. |
A collection of types |
Load(Int32)
Load a tab based on identifier
Declaration
public virtual TabDefinition Load(int id)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The tab identifier |
Returns
Type | Description |
---|---|
Tab |
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. |
name | The tab name |
Returns
Type | Description |
---|---|
Tab |
A tab or null if not found |
Merge(TabDefinition)
Merge the Tab
Declaration
protected virtual void Merge(TabDefinition tabDefinition)
Parameters
Type | Name | Description |
---|---|---|
Tab |
tabDefinition | tabDefinition |
OnTabDefinitionDeleted(EventArgs)
Raises the Tab
Declaration
protected virtual void OnTabDefinitionDeleted(EventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System. |
args | The System. |
OnTabDefinitionSaved(EventArgs)
Raises the Tab
Declaration
protected virtual void OnTabDefinitionSaved(EventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System. |
args | The System. |
Save(TabDefinition)
Stores or updates a specified tab definition in the repository.
Declaration
public virtual void Save(TabDefinition tabDefinition)
Parameters
Type | Name | Description |
---|---|---|
Tab |
tabDefinition | The tab definition that will be deleted |
Events
TabDefinitionDeleted
Occurs when a Tab
Declaration
public static event EventHandler<EventArgs> TabDefinitionDeleted
Event Type
Type | Description |
---|---|
System. |
TabDefinitionSaved
Occurs when a Tab
Declaration
public static event EventHandler<EventArgs> TabDefinitionSaved
Event Type
Type | Description |
---|---|
System. |