November Happy Hour will be moved to Thursday December 5th.

Class ContentLoaderService

Inheritance
System.Object
ContentLoaderService
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.Cms.Shell.Service.Internal
Assembly: EPiServer.Cms.Shell.UI.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(typeof(ContentLoaderService))]
public class ContentLoaderService

Constructors

ContentLoaderService(IContentLoader, IContentVersionRepository, ILanguageBranchRepository, IContentProviderManager, AncestorReferencesLoader, LanguageSelectorFactory, ISiteDefinitionRepository)

Declaration
public ContentLoaderService(IContentLoader contentLoader, IContentVersionRepository contentVersionRepository, ILanguageBranchRepository languageBranchRepository, IContentProviderManager contentProviderManager, AncestorReferencesLoader ancestorReferencesLoader, LanguageSelectorFactory languageSelectorFactory, ISiteDefinitionRepository siteDefinitionRepository)
Parameters
Type Name Description
IContentLoader contentLoader
IContentVersionRepository contentVersionRepository
ILanguageBranchRepository languageBranchRepository
IContentProviderManager contentProviderManager
AncestorReferencesLoader ancestorReferencesLoader
LanguageSelectorFactory languageSelectorFactory
ISiteDefinitionRepository siteDefinitionRepository

Methods

Get(ContentReference)

Declaration
public virtual IContent Get(ContentReference contentReference)
Parameters
Type Name Description
ContentReference contentReference
Returns
Type Description
IContent

Get(ContentReference, AccessLevel)

Declaration
public virtual IContent Get(ContentReference contentReference, AccessLevel accessLevel)
Parameters
Type Name Description
ContentReference contentReference
AccessLevel accessLevel
Returns
Type Description
IContent

Get<T>(ContentReference)

Declaration
public virtual T Get<T>(ContentReference contentReference)
    where T : class, IContent
Parameters
Type Name Description
ContentReference contentReference
Returns
Type Description
T
Type Parameters
Name Description
T

Get<T>(ContentReference, AccessLevel)

Declaration
public virtual T Get<T>(ContentReference contentReference, AccessLevel accessLevel)
    where T : class, IContent
Parameters
Type Name Description
ContentReference contentReference
AccessLevel accessLevel
Returns
Type Description
T
Type Parameters
Name Description
T

Get<T>(ContentReference, CultureInfo)

Declaration
public virtual T Get<T>(ContentReference contentReference, CultureInfo language)
    where T : class, IContent
Parameters
Type Name Description
ContentReference contentReference
System.Globalization.CultureInfo language
Returns
Type Description
T
Type Parameters
Name Description
T

GetAccessMask(IContent, IPrincipal)

Declaration
public virtual AccessLevel GetAccessMask(IContent content, IPrincipal principal)
Parameters
Type Name Description
IContent content
System.Security.Principal.IPrincipal principal
Returns
Type Description
AccessLevel

GetAncenstorReferences(ContentReference)

Declaration
public virtual IEnumerable<ContentReference> GetAncenstorReferences(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink
Returns
Type Description
System.Collections.Generic.IEnumerable<ContentReference>

GetAncestorNames(IContent, SiteDefinition)

Declaration
public virtual IEnumerable<string> GetAncestorNames(IContent content, SiteDefinition currentSiteDefinition)
Parameters
Type Name Description
IContent content
SiteDefinition currentSiteDefinition
Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

GetAncestors(ContentReference)

Declaration
public virtual IEnumerable<IContent> GetAncestors(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink
Returns
Type Description
System.Collections.Generic.IEnumerable<IContent>

GetChildren<T>(ContentReference)

Declaration
public virtual IEnumerable<T> GetChildren<T>(ContentReference parent)
    where T : class, IContent
Parameters
Type Name Description
ContentReference parent
Returns
Type Description
System.Collections.Generic.IEnumerable<T>
Type Parameters
Name Description
T

GetChildren<T>(ContentReference, LoaderOptions)

Declaration
public virtual IEnumerable<T> GetChildren<T>(ContentReference parent, LoaderOptions loaderOptions)
    where T : class, IContent
Parameters
Type Name Description
ContentReference parent
LoaderOptions loaderOptions
Returns
Type Description
System.Collections.Generic.IEnumerable<T>
Type Parameters
Name Description
T

GetChildren<T>(ContentReference, CultureInfo)

Declaration
public virtual IEnumerable<T> GetChildren<T>(ContentReference parent, CultureInfo contentLanguage)
    where T : class, IContent
Parameters
Type Name Description
ContentReference parent
System.Globalization.CultureInfo contentLanguage
Returns
Type Description
System.Collections.Generic.IEnumerable<T>
Type Parameters
Name Description
T

GetCommonDraft(ContentReference, CultureInfo)

Declaration
public virtual ContentVersion GetCommonDraft(ContentReference contentLink, CultureInfo culture)
Parameters
Type Name Description
ContentReference contentLink
System.Globalization.CultureInfo culture
Returns
Type Description
ContentVersion

GetCommonDrafts(IEnumerable<ContentReference>)

Declaration
public virtual IEnumerable<ContentVersion> GetCommonDrafts(IEnumerable<ContentReference> contentLinks)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> contentLinks
Returns
Type Description
System.Collections.Generic.IEnumerable<ContentVersion>

GetCommonDrafts(IEnumerable<ContentReference>, CultureInfo)

Declaration
public virtual IEnumerable<ContentVersion> GetCommonDrafts(IEnumerable<ContentReference> contentLinks, CultureInfo culture)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> contentLinks
System.Globalization.CultureInfo culture
Returns
Type Description
System.Collections.Generic.IEnumerable<ContentVersion>

GetItems(IEnumerable<ContentReference>)

Declaration
public virtual IEnumerable<IContent> GetItems(IEnumerable<ContentReference> contentReferences)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> contentReferences
Returns
Type Description
System.Collections.Generic.IEnumerable<IContent>

GetItems(IEnumerable<ContentReference>, LanguageSelector)

Declaration
public virtual IEnumerable<IContent> GetItems(IEnumerable<ContentReference> contentReferences, LanguageSelector languageSelector)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> contentReferences
LanguageSelector languageSelector
Returns
Type Description
System.Collections.Generic.IEnumerable<IContent>

GetItems(IEnumerable<ContentReference>, LoaderOptions)

Declaration
public virtual IEnumerable<IContent> GetItems(IEnumerable<ContentReference> contentReferences, LoaderOptions loaderOptions)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> contentReferences
LoaderOptions loaderOptions
Returns
Type Description
System.Collections.Generic.IEnumerable<IContent>

GetItems(IEnumerable<ContentReference>, AccessLevel)

Declaration
public virtual IEnumerable<IContent> GetItems(IEnumerable<ContentReference> contentReferences, AccessLevel accessLevel)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> contentReferences
AccessLevel accessLevel
Returns
Type Description
System.Collections.Generic.IEnumerable<IContent>

GetPublishedVersion(ContentReference)

Declaration
public virtual ContentVersion GetPublishedVersion(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink
Returns
Type Description
ContentVersion

GetPublishedVersion(ContentReference, CultureInfo)

Declaration
public virtual ContentVersion GetPublishedVersion(ContentReference contentLink, CultureInfo culture)
Parameters
Type Name Description
ContentReference contentLink
System.Globalization.CultureInfo culture
Returns
Type Description
ContentVersion

GetUnspecificVersion(ContentReference)

Declaration
public virtual IContent GetUnspecificVersion(ContentReference contentReference)
Parameters
Type Name Description
ContentReference contentReference
Returns
Type Description
IContent

HasEditAccess(IContent, AccessLevel)

Declaration
public virtual bool HasEditAccess(IContent content, AccessLevel accessLevel)
Parameters
Type Name Description
IContent content
AccessLevel accessLevel
Returns
Type Description
System.Boolean

HasEditAccess(IContent, IPrincipal, AccessLevel)

Declaration
public virtual bool HasEditAccess(IContent content, IPrincipal principal, AccessLevel accessLevel)
Parameters
Type Name Description
IContent content
System.Security.Principal.IPrincipal principal
AccessLevel accessLevel
Returns
Type Description
System.Boolean

IsContentInsideLocalAssetFolder(ContentReference, SiteDefinition)

Declaration
public virtual bool IsContentInsideLocalAssetFolder(ContentReference contentLink, SiteDefinition siteDefinition)
Parameters
Type Name Description
ContentReference contentLink
SiteDefinition siteDefinition
Returns
Type Description
System.Boolean

TryGet<T>(ContentReference, out T)

Declaration
public virtual bool TryGet<T>(ContentReference contentReference, out T content)
    where T : class, IContent
Parameters
Type Name Description
ContentReference contentReference
T content
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T

TryGet<T>(Guid, out T)

Declaration
public virtual bool TryGet<T>(Guid contentGuid, out T content)
    where T : class, IContent
Parameters
Type Name Description
System.Guid contentGuid
T content
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T

Extension Methods