Table of Contents

Interface ILookUpEngine

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

Resolves Configurations from LookUps. Common use is for configurable DataSources

[InternalApi_DoNotUse_MayChangeWithoutNotice]
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]
IEnumerable<ILookUp> Sources { get; }

Property Value

IEnumerable<ILookUp>

Methods

FindSource(string)

Find a source by name in the current engine or any downstream engines.

[InternalApi_DoNotUse_MayChangeWithoutNotice]
ILookUp FindSource(string name)

Parameters

name string

the name we're looking for, invariant

Returns

ILookUp

HasSource(string)

Will check if the lookup engine - or any of it's downstream engines - have a source with the given name

[InternalApi_DoNotUse_MayChangeWithoutNotice]
bool HasSource(string name)

Parameters

name string

the name we're looking for, invariant

Returns

bool

LookUp(IDictionary<string, string>, IEnumerable<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, IEnumerable<ILookUp> overrides = null, int depth = 4)

Parameters

values IDictionary<string, string>

Dictionary of configuration strings.

overrides IEnumerable<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>