Class ContentProviderMap
Data class for storing content providers, use IContentProviderManager to access the global instance of this class
Inheritance
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class ContentProviderMap : Object
Constructors
ContentProviderMap()
Initializes a new instance of the ContentProviderMap class initialized with specified providers.
Declaration
public ContentProviderMap()
Properties
CustomProvidersExist
Gets a value indicating whether there exist other providers than Default provider
Declaration
public virtual bool CustomProvidersExist { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
AddProvider(ContentProvider)
Adds a content provider including entry points for the content provider to the map.
Declaration
public virtual void AddProvider(ContentProvider provider)
Parameters
Type | Name | Description |
---|---|---|
ContentProvider | provider | The content provider. |
GetDefaultProvider()
Gets the default provider, that is the provider that is registered with key String.Empty.
Declaration
public virtual ContentProvider GetDefaultProvider()
Returns
Type | Description |
---|---|
ContentProvider | Default content provider |
GetProvider(ContentReference)
Gets the content provider that serves the content specified by the given content reference
Declaration
public virtual ContentProvider GetProvider(ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
Returns
Type | Description |
---|---|
ContentProvider |
GetProvider(String)
Gets the content provider instance registered with given id.
Declaration
public virtual ContentProvider GetProvider(string providerId)
Parameters
Type | Name | Description |
---|---|---|
System.String | providerId | The provider id. |
Returns
Type | Description |
---|---|
ContentProvider | The content provider registered with the given id |
IsEntryPoint(ContentReference)
Determines whether the specified contentLink is registered as an entrypoint
Declaration
public virtual bool IsEntryPoint(ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Iterate(Action<ContentProvider>)
Method that let passed in delegate operate on each registered content provider
Declaration
public void Iterate(Action<ContentProvider> contentProviderHandler)
Parameters
Type | Name | Description |
---|---|---|
System.Action<ContentProvider> | contentProviderHandler | The content provider handler. |
Iterate(Func<ContentProvider, Boolean>)
Method that let passed in delegate operate on each registered content provider
Declaration
public void Iterate(Func<ContentProvider, bool> contentProviderFunction)
Parameters
Type | Name | Description |
---|---|---|
System.Func<ContentProvider, System.Boolean> | contentProviderFunction | The delegate function called for each provider. If function returns true the iteration is stopped. |
RemoveProvider(String)
Remove any loaded ContentProvider
Declaration
public virtual bool RemoveProvider(string providerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | providerName | Name of the provider. |
Returns
Type | Description |
---|---|
System.Boolean | True if remove succeded |