Class AppRoot
- Namespace
- ToSic.Eav.DataSources
- Assembly
- ToSic.Eav.DataSources.dll
The App Root is the entry point for all data. It takes its data from a hidden AppState Cache.
It's implemented as a DataSource so that other DataSources can easily attach to it.
This is also the object returned as the root in any query.
[InternalApi_DoNotUse_MayChangeWithoutNotice("this is just fyi")]
public class AppRoot : DataSourceBase, IAppRoot, IDataSource, IDataSourceLinkable, IAppIdentity, IZoneIdentity, IAppIdentityLight, ICacheKey, ICacheExpiring, ITimestamped, IHasLog
- Inheritance
-
objectServiceBaseAppRoot
- Implements
- Inherited Members
Properties
CacheTimestamp
System time-stamp of when the data in this cached thing was initialized or updated. Depending on the implementation, this may go up-stream and return an up-stream value.
public override long CacheTimestamp { get; }
Property Value
- long
A timestamp as a long number
Link
A link - or possibly many. In most cases, this references the parent object which provides this/these links.
public override IDataSourceLink Link { get; }
Property Value
Methods
CacheChanged(long)
Detect if the cache has newer data. It's called using the TimeStamp of the dependent object which may still have old data.
public override bool CacheChanged(long dependentTimeStamp)
Parameters
dependentTimeStamp
longNew time stamp of a dependent object, which could have an older timestamp.
Returns
- bool
True if the timestamps differ, false if it's the same
Remarks
This is implemented in each object, because sometimes it compares its own timestamp, sometimes that of another underlying object.