Interface IAppReaderFactory
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
Get(int)
Get a reader for the specified app.
IAppReader Get(int appId)
Parameters
appId
int
Returns
Get(IAppIdentity)
Get a reader for the specified app.
IAppReader Get(IAppIdentity app)
Parameters
app
IAppIdentity
Returns
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
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
NoParamOrdernullIfNotLoaded
bool
Returns
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