SaaS CMS has officially launched! Learn more now.

Class CategorizableExtensions

Gets the relations for a ICategorizable implementation.

Inheritance
System.Object
CategorizableExtensions
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.Commerce.Catalog.ContentTypes
Assembly: EPiServer.Business.Commerce.dll
Version: 11.8.3
Syntax
public static class CategorizableExtensions

Methods

GetNodeRelations(ICategorizable)

Gets the node relations

Declaration
public static IEnumerable<Relation> GetNodeRelations(this ICategorizable categorizable)
Parameters
Type Name Description
ICategorizable categorizable

The relating implementation

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

Collection of relations.

Remarks

This method uses the EPiServer.ServiceLocation.ServiceLocator to resolve the IRelationRepository, which will be send to the method that contains the relations getter

GetNodeRelations(ICategorizable, ILinksRepository)

Declaration
[Obsolete("Use the overload with IRelationRepository. Will remain at least until September 2017.")]
public static IEnumerable<Relation> GetNodeRelations(this ICategorizable categorizable, ILinksRepository linksRepository)
Parameters
Type Name Description
ICategorizable categorizable
ILinksRepository linksRepository
Returns
Type Description
System.Collections.Generic.IEnumerable<Relation>

GetNodeRelations(ICategorizable, IRelationRepository)

Gets the node relations

Declaration
public static IEnumerable<Relation> GetNodeRelations(this ICategorizable categorizable, IRelationRepository relationRepository)
Parameters
Type Name Description
ICategorizable categorizable

The relating implementation

IRelationRepository relationRepository

The relation repository.

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