Table of Contents

Interface ILookUpEngine

Namespace
ToSic.Eav.LookUp
Assembly
ToSic.Eav.Core.dll

Resolves Configurations from LookUps. Common use is for configurable DataSources

[PublicApi]
public interface ILookUpEngine : IHasLog
Inherited Members

Properties

Downstream

[InternalApi_DoNotUse_MayChangeWithoutNotice]
ILookUpEngine Downstream { get; }

Property Value

ILookUpEngine

Sources

Property Sources this Provider can use. Sources are various dictionaries which can resolve a key to a value.
Read more about this in LookUp System

[InternalApi_DoNotUse_MayChangeWithoutNotice]
Dictionary<string, ILookUp> Sources { get; }

Property Value

Dictionary<string, ILookUp>

Dictionary<TKey, TValue> of ILookUp items.

Methods

Add(ILookUp)

Add (or replace) a value provider in the source list

void Add(ILookUp lookUp)

Parameters

lookUp ILookUp

An source to add to this configuration provider. The name will be taken from this object.

AddOverride(IEnumerable<ILookUp>)

Add many overriding sources.
This is used when the underlying configuration provider is shared, and this instance needs a few custom configurations.

void AddOverride(IEnumerable<ILookUp> lookUps)

Parameters

lookUps IEnumerable<ILookUp>

list of ILookUp which should override the original configuration

AddOverride(ILookUp)

Add an overriding source.
This is used when the underlying configuration provider is shared, and this instance needs a few custom configurations.

void AddOverride(ILookUp lookUp)

Parameters

lookUp ILookUp

a ILookUp which should override the original configuration

FindSource(string)

[InternalApi_DoNotUse_MayChangeWithoutNotice]
ILookUp FindSource(string name)

Parameters

name string

Returns

ILookUp

HasSource(string)

[InternalApi_DoNotUse_MayChangeWithoutNotice]
bool HasSource(string name)

Parameters

name string

Returns

bool

LookUp(IDictionary<string, string>, IDictionary<string, ILookUp>, int)

This will go through a dictionary of strings (usually configuration values) and replace all tokens in that string with whatever the token-resolver delivers. It's usually needed to initialize a DataSource.

IDictionary<string, string> LookUp(IDictionary<string, string> values, IDictionary<string, ILookUp> overrides = null, int depth = 4)

Parameters

values IDictionary<string, string>

Dictionary of configuration strings.

overrides IDictionary<string, ILookUp>

Optional override LookUps which would be consulted first.

depth int

Max recursion when looking up tokens which return other tokens.

Returns

IDictionary<string, string>