Class AppRoot
The App Root is the entry point for all data. It takes it's 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.
Inheritance
Implements
Inherited Members
Namespace: ToSic.Eav.DataSources
Assembly: ToSic.Eav.DataSources.dll
Syntax
[InternalApi_DoNotUse_MayChangeWithoutNotice("this is just fyi")]
public class AppRoot : DataSourceBase, IAppIdentitySync, IAppRoot, IDataSource, IDataSourceLinkable, IAppIdentity, IZoneIdentity, IAppIdentityLight, ICacheInfo, ICacheKey, ICacheExpiring, ITimestamped, ICanPurgeListCache, IHasLog, IDataTarget
Properties
| Improve this Doc View SourceCacheFullKey
Combination of the current key and all keys of upstream cached items, to create a long unique key for this context.
Declaration
public override string CacheFullKey { get; }
Property Value
Type | Description |
---|---|
System.String | Full key containing own partial key and upstream keys. |
Overrides
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.
Declaration
public override long CacheTimestamp { get; }
Property Value
Type | Description |
---|---|
System.Int64 | A timestamp as a long number |
Overrides
| Improve this Doc View SourceLink
Declaration
public override IDataSourceLink Link { get; }
Property Value
Type | Description |
---|---|
IDataSourceLink |
Overrides
Methods
| Improve this Doc View SourceCacheChanged(Int64)
Detect if the cache has newer data. It's called using the TimeStamp of the dependent object which may still have old data.
Declaration
public override bool CacheChanged(long dependentTimeStamp)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | dependentTimeStamp | New time stamp of a dependent object, which could have an older timestamp. |
Returns
Type | Description |
---|---|
System.Boolean | True if the timestamps differ, false if it's the same |
Overrides
Remarks
This is implemented in each object, because sometimes it compares its own timestamp, sometimes that of another underlying object.