Class SiteDefinitionRepository
The repository that handles loading and persisting of sites, see SiteDefinition.
Inheritance
Inherited Members
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public class SiteDefinitionRepository
Constructors
SiteDefinitionRepository(DynamicDataStoreFactory, ISynchronizedObjectInstanceCache)
Initializes a new instance of the SiteDefinitionRepository class.
Declaration
public SiteDefinitionRepository(DynamicDataStoreFactory storeFactory, ISynchronizedObjectInstanceCache cache)
Parameters
Type | Name | Description |
---|---|---|
DynamicDataStoreFactory | storeFactory | The store factory. |
ISynchronizedObjectInstanceCache | cache | The cache. |
Methods
Delete(Guid)
Deletes the SiteDefinition with specified id.
Declaration
public virtual void Delete(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The id. |
Get(Guid)
Gets the SiteDefinition with specified id.
Declaration
public virtual SiteDefinition Get(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The id. |
Returns
Type | Description |
---|---|
SiteDefinition |
Get(String)
Gets the SiteDefinition with specified name.
Declaration
public virtual SiteDefinition Get(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
Returns
Type | Description |
---|---|
SiteDefinition |
Get(HttpRequestBase)
Gets the SiteDefinition that has a host that matches specified request.
Declaration
public virtual SiteDefinition Get(HttpRequestBase request)
Parameters
Type | Name | Description |
---|---|---|
System.Web.HttpRequestBase | request | The request. |
Returns
Type | Description |
---|---|
SiteDefinition |
GetHostName(HttpRequestBase)
Gets the name of the host from the request
Declaration
public virtual string GetHostName(HttpRequestBase request)
Parameters
Type | Name | Description |
---|---|---|
System.Web.HttpRequestBase | request | The request. |
Returns
Type | Description |
---|---|
System.String |
List()
Lists all defined SiteDefinition.
Declaration
public virtual IEnumerable<SiteDefinition> List()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SiteDefinition> |
Exceptions
Type | Condition |
---|---|
System.NotImplementedException |
OnSiteDefinitionChanged()
Called when site definition changed.
Declaration
protected virtual void OnSiteDefinitionChanged()
Save(SiteDefinition)
Saves the specified site definition.
Declaration
public virtual void Save(SiteDefinition siteDefinition)
Parameters
Type | Name | Description |
---|---|---|
SiteDefinition | siteDefinition | The site definition. |
Events
SiteDefinitionChanged
Occurs when some SiteDefinition was changed or deleted.
Declaration
public event EventHandler<EventArgs> SiteDefinitionChanged
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |