Class ContentFragmentFactory
Factory class for content fragment, which makes it possible to create a ContentFragment by a Guid.
Inheritance
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 9.12.2Syntax
[ServiceConfiguration]
public class ContentFragmentFactory
Constructors
ContentFragmentFactory(IContentRepository, TemplateControlLoader, DisplayOptions, IPublishedStateAssessor)
Initializes a new instance of the ContentFragmentFactory class.
Declaration
[Obsolete("Use alternative constructor")]
public ContentFragmentFactory(IContentRepository contentRepository, TemplateControlLoader templateControlLoader, DisplayOptions displayOptions, IPublishedStateAssessor publishedStateAssessor)
Parameters
Type | Name | Description |
---|---|---|
IContentRepository | contentRepository | |
TemplateControlLoader | templateControlLoader | |
DisplayOptions | displayOptions | |
IPublishedStateAssessor | publishedStateAssessor |
ContentFragmentFactory(IContentRepository, TemplateControlLoader, DisplayOptions, IPublishedStateAssessor, IContentAccessEvaluator, IPermanentLinkMapper, IContextModeResolver)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the ContentFragmentFactory class.
Declaration
public ContentFragmentFactory(IContentRepository contentRepository, TemplateControlLoader templateControlLoader, DisplayOptions displayOptions, IPublishedStateAssessor publishedStateAssessor, IContentAccessEvaluator contentAccessEvaluator, IPermanentLinkMapper permanentLinkMapper, IContextModeResolver contextModeResolver)
Parameters
Type | Name | Description |
---|---|---|
IContentRepository | contentRepository | The content repository. |
TemplateControlLoader | templateControlLoader | The template control loader. |
DisplayOptions | displayOptions | The display options service. |
IPublishedStateAssessor | publishedStateAssessor | The published state assessor. |
IContentAccessEvaluator | contentAccessEvaluator | The content access evaluator |
IPermanentLinkMapper | permanentLinkMapper | The permanent link mapper. |
IContextModeResolver | contextModeResolver | The registered context mode resolver |
ContentFragmentFactory(IContentRepository, TemplateControlLoader, DisplayOptions, IPublishedStateAssessor, IPermanentLinkMapper)
Initializes a new instance of the ContentFragmentFactory class.
Declaration
[Obsolete("Use alternative constructor")]
public ContentFragmentFactory(IContentRepository contentRepository, TemplateControlLoader templateControlLoader, DisplayOptions displayOptions, IPublishedStateAssessor publishedStateAssessor, IPermanentLinkMapper permanentLinkMapper)
Parameters
Type | Name | Description |
---|---|---|
IContentRepository | contentRepository | |
TemplateControlLoader | templateControlLoader | |
DisplayOptions | displayOptions | |
IPublishedStateAssessor | publishedStateAssessor | |
IPermanentLinkMapper | permanentLinkMapper |
Methods
CreateContentFragment(ContentReference, Guid, ISecuredFragmentMarkupGenerator)
Creates a content fragment using the provided content identifiers.
Declaration
public virtual ContentFragment CreateContentFragment(ContentReference contentLink, Guid contentGuid, ISecuredFragmentMarkupGenerator securedFragmentMarkupGenerator)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
System.Guid | contentGuid | The content GUID. |
ISecuredFragmentMarkupGenerator | securedFragmentMarkupGenerator | The secured fragment markup generator. |
Returns
Type | Description |
---|---|
ContentFragment | The content fragment that was created. |
CreateContentFragment(ContentReference, Guid, ISecuredFragmentMarkupGenerator, IDictionary<String, Object>)
Creates a content fragment using the provided content identifiers.
Declaration
public virtual ContentFragment CreateContentFragment(ContentReference contentLink, Guid contentGuid, ISecuredFragmentMarkupGenerator securedFragmentMarkupGenerator, IDictionary<string, object> attributes)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
System.Guid | contentGuid | The content GUID. |
ISecuredFragmentMarkupGenerator | securedFragmentMarkupGenerator | The secured fragment markup generator. |
System.Collections.Generic.IDictionary<System.String, System.Object> | attributes | The custom attributes for the fragment. |
Returns
Type | Description |
---|---|
ContentFragment | The content fragment that was created. |
CreateContentFragment(ContentReference, Guid, String, ISecuredFragmentMarkupGenerator)
Creates a content fragment using the provided content identifiers.
Declaration
public virtual ContentFragment CreateContentFragment(ContentReference contentLink, Guid contentGuid, string tag, ISecuredFragmentMarkupGenerator securedFragmentMarkupGenerator)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
System.Guid | contentGuid | The content GUID. |
System.String | tag | The tag for the Content Fragment |
ISecuredFragmentMarkupGenerator | securedFragmentMarkupGenerator | The secured fragment markup generator. |
Returns
Type | Description |
---|---|
ContentFragment | The content fragment that was created. |
CreateContentFragment(ContentReference, Guid, String, ISecuredFragmentMarkupGenerator, IDictionary<String, Object>)
Creates a content fragment using the provided content identifiers.
Declaration
public virtual ContentFragment CreateContentFragment(ContentReference contentLink, Guid contentGuid, string tag, ISecuredFragmentMarkupGenerator securedFragmentMarkupGenerator, IDictionary<string, object> attributes)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
System.Guid | contentGuid | The content GUID. |
System.String | tag | The tag for the Content Fragment |
ISecuredFragmentMarkupGenerator | securedFragmentMarkupGenerator | The secured fragment markup generator. |
System.Collections.Generic.IDictionary<System.String, System.Object> | attributes | The custom attributes for the fragment. |
Returns
Type | Description |
---|---|
ContentFragment | The content fragment that was created. |