Class DynamicContentFactory
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Factory class that handles creating dynamic content object.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.DynamicContent.Internal
Assembly: EPiServer.dll
Version: 10.10.4Syntax
[ServiceConfiguration(typeof(IDynamicContentFactory), FactoryMember = "Instance")]
public class DynamicContentFactory : IDynamicContentFactory
Constructors
DynamicContentFactory()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the DynamicContentFactory class.
Declaration
public DynamicContentFactory()
DynamicContentFactory(IHashHandler)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the DynamicContentFactory class.
Declaration
public DynamicContentFactory(IHashHandler hashHandler)
Parameters
Type | Name | Description |
---|---|---|
IHashHandler | hashHandler | The hash handler to use. |
DynamicContentFactory(IHashHandler, LocalizationService)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the DynamicContentFactory class.
Declaration
public DynamicContentFactory(IHashHandler hashHandler, LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
IHashHandler | hashHandler | The hash handler to use. |
LocalizationService | localizationService | The resource locator that should be used by the instance to get localized strings. |
Properties
DynamicContentId
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the GUID used to identify EPiServer dynamic content.
Declaration
public Guid DynamicContentId { get; }
Property Value
Type | Description |
---|---|
System.Guid |
HashHandler
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the hash handler used to generate and validate hashes.
Declaration
public IHashHandler HashHandler { get; }
Property Value
Type | Description |
---|---|
IHashHandler | The hash handler. |
Instance
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the one and only instance of DynamicContentFactory
Declaration
public static DynamicContentFactory Instance { get; }
Property Value
Type | Description |
---|---|
DynamicContentFactory |
Methods
ClearRegistrations()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Clears the registrations in the factory instance.
Declaration
public void ClearRegistrations()
CreateDynamicContent(String, String, String, Boolean)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Creates a dynamic content control.
Declaration
public IDynamicContentBase CreateDynamicContent(string name, string state, string hash, bool validateHash)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
System.String | state | |
System.String | hash | |
System.Boolean | validateHash |
Returns
Type | Description |
---|---|
IDynamicContentBase | The created control. |
Description(Type)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Returns the descriptions for the specified dynamic content type.
Declaration
public string Description(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type. |
Returns
Type | Description |
---|---|
System.String | A description string. |
Remarks
This string will be used as a fallback for description if no description for the dynamic content type can be found in the language files.
GetMarkup(IDynamicContentBase, Boolean, ISecuredFragmentMarkupGenerator)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the XHTML markup for the supplied dynamic content control.
Declaration
public string GetMarkup(IDynamicContentBase dynamicContent, bool generateHash, ISecuredFragmentMarkupGenerator groupMarkupGenerator)
Parameters
Type | Name | Description |
---|---|---|
IDynamicContentBase | dynamicContent | The dynamic content control. |
System.Boolean | generateHash | if set to |
ISecuredFragmentMarkupGenerator | groupMarkupGenerator | The ISecuredFragmentMarkupGenerator that is responsible to create markup to indicate that the content is restricted to a number of groups. |
Returns
Type | Description |
---|---|
System.String | A string with HTML that represents the dynamic content. |
GetMarkupForEditor(IDynamicContentBase, Boolean, ISecuredFragmentMarkupGenerator)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the markup that is presented when editing.
Declaration
public string GetMarkupForEditor(IDynamicContentBase dynamicContent, bool generateHash, ISecuredFragmentMarkupGenerator groupMarkupGenerator)
Parameters
Type | Name | Description |
---|---|---|
IDynamicContentBase | dynamicContent | The IDynamicContentBase to generate markup for. |
System.Boolean | generateHash | if set to |
ISecuredFragmentMarkupGenerator | groupMarkupGenerator | The ISecuredFragmentMarkupGenerator that is responsible to create markup to indicate that the content is restricted to a number of groups. |
Returns
Type | Description |
---|---|
System.String | Markup that is loaded when loading the dynamic content in edit mode. |
InstantiateDynamicContent(String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Instantiate a dynamic content control.
Declaration
public IDynamicContentBase InstantiateDynamicContent(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
IDynamicContentBase | The created control. |
Name(Type)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Get the name of the specified dynamic content type.
Declaration
public string Name(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type. |
Returns
Type | Description |
---|---|
System.String | The name as a string. |
Remarks
This string will be used as a fallback for display name if no display name for the dynamic content type can be found in the language files.
Register(Type, String, String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Registers the specified dynamic content type.
Declaration
public bool Register(Type type, string name, string description)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The dynamic content type. |
System.String | name | The name of the dynamic content. |
System.String | description | The description. |
Returns
Type | Description |
---|---|
System.Boolean | True if the registration succeeded, otherwise false. |
Remarks
The registration will fail if there is already a dynamic content registered with the same name or type.
RegisteredTypes()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Enumerates the registered dynamic contents types.
Declaration
public IEnumerable<Type> RegisteredTypes()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Type> | An System.Collections.Generic.IEnumerable<T> of System.Type for all the dynamic content types that have been registered. |