Table of Contents

Class RelationshipAssembler

Namespace
ToSic.Eav.Data.Build.Sys
Assembly
ToSic.Eav.Data.Build.dll

Internal assembler to create relationship values.

[InternalApi_DoNotUse_MayChangeWithoutNotice]
public class RelationshipAssembler : ServiceWithSetup<DataAssemblerOptions>, IHasLog, IHasOptions<DataAssemblerOptions>, IServiceWithSetup<DataAssemblerOptions>
Inheritance
object
RelationshipAssembler
Implements
Inherited Members

Constructors

RelationshipAssembler()

Internal assembler to create relationship values.

public RelationshipAssembler()

Methods

GetDefaultOptions()

Method to generate new / default options. This should usually not be called, but it might; so if your service can work without valid options (or accesses options before setup), this would trigger.

This could also be triggered, if the service was created without the correct Generator. Note that it's always an option to just throw an exception.

You must override this to provide your own default options.

protected override DataAssemblerOptions GetDefaultOptions()

Returns

DataAssemblerOptions

Exceptions

ServiceOptionsRequiredException

Relationship(IEnumerable<IEntity?>)

public IValue Relationship(IEnumerable<IEntity?> directList)

Parameters

directList IEnumerable<IEntity>

Returns

IValue

ToSource(ICollection<Guid?>, IEntitiesSource?)

public IEnumerable<IEntity?> ToSource(ICollection<Guid?> guids, IEntitiesSource? fullLookupList)

Parameters

guids ICollection<Guid?>
fullLookupList IEntitiesSource

Returns

IEnumerable<IEntity>

ToSource(ICollection<int?>, IEntitiesSource)

public IEnumerable<IEntity?> ToSource(ICollection<int?> references, IEntitiesSource app)

Parameters

references ICollection<int?>
app IEntitiesSource

Returns

IEnumerable<IEntity>

ToSource(IEnumerable<object>, ILookup<object, IEntity>)

public IEnumerable<IEntity?> ToSource(IEnumerable<object> keys, ILookup<object, IEntity> lookup)

Parameters

keys IEnumerable<dynamic>
lookup ILookup<object, IEntity>

Returns

IEnumerable<IEntity>

ToSource(IRelatedEntitiesValue, IEntitiesSource)

public IEnumerable<IEntity?> ToSource(IRelatedEntitiesValue value, IEntitiesSource app)

Parameters

value IRelatedEntitiesValue
app IEntitiesSource

Returns

IEnumerable<IEntity>