London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Class VariantContainerExtensions

Gets the variant relations for a IVariantContainer implementation.

Inheritance
System.Object
VariantContainerExtensions
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: 13.30.0
Syntax
public static class VariantContainerExtensions

Methods

GetVariantRelations(IVariantContainer)

Gets the variant relations

Declaration
public static IEnumerable<Relation> GetVariantRelations(this IVariantContainer variantContainer)
Parameters
Type Name Description
IVariantContainer variantContainer

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

GetVariantRelations(IVariantContainer, IRelationRepository)

Gets the variant relations

Declaration
public static IEnumerable<Relation> GetVariantRelations(this IVariantContainer variantContainer, IRelationRepository relationRepository)
Parameters
Type Name Description
IVariantContainer variantContainer

The relating implementation.

IRelationRepository relationRepository

The relation repository.

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