Class AncestorReferencesLoader

Loads ancestor references for a content. The result is cached so any subsequent call to method on same request will get cached result.

Inheritance
System.Object
AncestorReferencesLoader
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.Web.Routing
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(typeof(AncestorReferencesLoader), Lifecycle = ServiceInstanceScope.Singleton)]
public class AncestorReferencesLoader

Constructors

AncestorReferencesLoader(IContentLoader, IContentEvents, ISynchronizedObjectInstanceCache)

Initializes a new instance of the AncestorReferencesLoader class.

Declaration
public AncestorReferencesLoader(IContentLoader contentLoader, IContentEvents contentEvents, ISynchronizedObjectInstanceCache cache)
Parameters
Type Name Description
IContentLoader contentLoader

The content loader.

IContentEvents contentEvents

The content events.

ISynchronizedObjectInstanceCache cache

The cache.

Methods

GetAncestors(ContentReference)

Gets the ancestors for a content.The result is cached so any subsequent call to method will get cached result.

Declaration
public virtual IEnumerable<ContentReference> GetAncestors(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
System.Collections.Generic.IEnumerable<ContentReference>

GetAncestors(ContentReference, AncestorLoaderRule)

Gets the ancestors for a content.The result is cached so any subsequent call to method will get cached result.

Declaration
public virtual IEnumerable<ContentReference> GetAncestors(ContentReference contentLink, AncestorLoaderRule rule)
Parameters
Type Name Description
ContentReference contentLink

The content link.

AncestorLoaderRule rule

The rule that specifies how to retrieve parents

Returns
Type Description
System.Collections.Generic.IEnumerable<ContentReference>

Extension Methods