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
Namespace: EPiServer.Web.Routing
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class AncestorReferencesLoader : Object
Constructors
AncestorReferencesLoader()
Exposed for tests
Declaration
protected AncestorReferencesLoader()
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> |