Table of Contents
These v19 docs are archived 🔒. Go to the latest docs home or try if this exact page is available in the latest docs.

Interface IAppReaderFactory

Namespace
ToSic.Eav.Apps
Assembly
ToSic.Eav.Core.dll

Internal system to retrieve AppReaders for accessing app state/data directly.

It is documented but not meant to be used outside the core team.

[InternalApi_DoNotUse_MayChangeWithoutNotice]
public interface IAppReaderFactory

Remarks

This was introduced in 2sxc 18 to replace older AppStates mechanisms. It ensures that the reading actions are done in a controlled way, and that the app state is always up-to-date.

Methods

AppIdentity(int)

IAppIdentityPure AppIdentity(int appId)

Parameters

appId int

Returns

IAppIdentityPure

Get(int)

Get a reader for the specified app.

IAppReader Get(int appId)

Parameters

appId int

Returns

IAppReader

Get(IAppIdentity)

Get a reader for the specified app.

IAppReader Get(IAppIdentity app)

Parameters

app IAppIdentity

Returns

IAppReader

GetOrKeep(IAppIdentity)

Helper for internal purposes. Sometimes code will get an app identity, but it could also be a Reader. For performance reasons, this will get you the reader, but possibly without having to create a new one.

IAppReader GetOrKeep(IAppIdentity appOrReader)

Parameters

appOrReader IAppIdentity

Returns

IAppReader

GetSystemPreset(NoParamOrder, bool)

Get the preset App of the system. In a very special case, it should skip this if it's not loaded.

IAppReader GetSystemPreset(NoParamOrder protector = default, bool nullIfNotLoaded = false)

Parameters

protector NoParamOrder
nullIfNotLoaded bool

Returns

IAppReader

GetZonePrimary(int)

Get a reader of the zone's primary app. Typically, this is he site-primary app, which contains site metadata and settings.

IAppReader GetZonePrimary(int zoneId)

Parameters

zoneId int

Returns

IAppReader