Class PageProviderMap

Class that handles routing/calls to all page providers.

Inheritance
System.Object
PageProviderMap
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.Core
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
[Obsolete("Use ContentProviderMap instead")]
public class PageProviderMap

Constructors

PageProviderMap(PermanentContentLinkMapper)

Initializes a new instance of the PageProviderMap class initialized with specified providers.

Declaration
public PageProviderMap(PermanentContentLinkMapper pageLinkMapStore)
Parameters
Type Name Description
PermanentContentLinkMapper pageLinkMapStore

The link mapper.

Remarks

When using this constructor the class also needs to be explicitly initialized using Initialize(ProviderSettingsCollection, IEnterpriseSettings).

Properties

CustomProvidersExist

Gets a value indicating whether there exist other providers than Default provider

Declaration
public bool CustomProvidersExist { get; }
Property Value
Type Description
System.Boolean

true if other providers than Default provider otherwise, false.

Methods

AddPageProvider(PageProviderBase)

Adds a page provider including entry points for the page provider to the map.

Declaration
public void AddPageProvider(PageProviderBase pageProvider)
Parameters
Type Name Description
PageProviderBase pageProvider

The page provider.

GetDefaultPageProvider()

Gets the default page store, that is the page store that is registered with key String.Empty.

Declaration
public PageProviderBase GetDefaultPageProvider()
Returns
Type Description
PageProviderBase

Default page store

GetEntryPoint(PageReference)

Gets the entry point for the page provider serving the page specified by the page reference

Declaration
public PageReference GetEntryPoint(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink

The page link.

Returns
Type Description
PageReference

GetPageProvider(PageReference)

Gets the page provider that serves the page specified by the given page reference

Declaration
public PageProviderBase GetPageProvider(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink

The page link.

Returns
Type Description
PageProviderBase

GetPageProvider(String)

Gets the page provider instance registered with given id.

Declaration
public PageProviderBase GetPageProvider(string providerId)
Parameters
Type Name Description
System.String providerId

The provider id.

Returns
Type Description
PageProviderBase

The page provider registered with the given id

GetStartPage(PageReference)

Gets the start page for the site serving the page.

Declaration
public PageReference GetStartPage(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink

The page link.

Returns
Type Description
PageReference
Exceptions
Type Condition
System.ArgumentException

is thrown if no page provider is registered with given RemoteSite given in pageLink

HasEntryPointChild(PageReference)

Check if this page is or has entry point as child page

Declaration
[Obsolete("Use DataFactory.HasEntryPointChild instead")]
public bool HasEntryPointChild(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink
Returns
Type Description
System.Boolean

true if page itself or some of it's descendants is an entry point to the page provider

Initialize(ProviderSettingsCollection, IEnterpriseSettings)

Initializes the provider map with the given enterprise settings and builds up the page providers.

Declaration
public void Initialize(ProviderSettingsCollection pageProviders, IEnterpriseSettings enterpriseSettings)
Parameters
Type Name Description
System.Configuration.ProviderSettingsCollection pageProviders

The page provider configuration.

IEnterpriseSettings enterpriseSettings

The enterprise settings.

IsEntryPoint(PageReference)

Determines whether the specified pageLink is registered as an entrypoint

Declaration
public bool IsEntryPoint(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink

The page link.

Returns
Type Description
System.Boolean

true if the specified pageLink is registered as a pageprovider; otherwise, false.

Iterate(PageProviderHandler)

Method that let passed in delegate operate on each registered page provider

Declaration
public void Iterate(PageProviderHandler pageProviderHandler)
Parameters
Type Name Description
PageProviderHandler pageProviderHandler

The page provider handler delegate

Iterate(Func<PageProviderBase, Boolean>)

Method that let passed in delegate operate on each registered page provider

Declaration
public void Iterate(Func<PageProviderBase, bool> pageProviderFunction)
Parameters
Type Name Description
System.Func<PageProviderBase, System.Boolean> pageProviderFunction

The delegate function called for each provider. If function returns true the iteration is stopped.

RemovePageProvider(String)

Remove any loaded PageProvider

Declaration
public bool RemovePageProvider(string pageProviderName)
Parameters
Type Name Description
System.String pageProviderName
Returns
Type Description
System.Boolean

True if remove succeded

Extension Methods