Class CustomDataSourceAdvanced
Base DataSource class for providing data from external sources. This is the advanced base class which is more complex. You will usually want to use the CustomDataSourceLight.
Inheritance
Implements
Inherited Members
Namespace: ToSic.Eav.DataSource
Assembly: ToSic.Eav.DataSources.dll
Syntax
[PublicApi]
public abstract class CustomDataSourceAdvanced : DataSourceBase, IDataSource, IDataSourceSource, IAppIdentity, IZoneIdentity, IAppIdentityLight, ICacheInfo, ICacheKey, ICacheExpiring, ITimestamped, ICanPurgeListCache, IHasLog, IDataSourceTarget, IDataTarget, IDataSourceShared, IAppIdentitySync, IDataSourceLinkable
Remarks
This has changed a lot in v15 (breaking change). Read about it in the docs.
Constructors
| Improve this Doc View SourceCustomDataSourceAdvanced(CustomDataSourceAdvanced.MyServices, String)
Initializes an DataSource which will usually provide/generate external data.
Declaration
protected CustomDataSourceAdvanced(CustomDataSourceAdvanced.MyServices services, string logName = null)
Parameters
Type | Name | Description |
---|---|---|
CustomDataSourceAdvanced.MyServices | services | Dependencies needed by this data source and/or the parent |
System.String | logName | The log name/identifier for insights logging. Optional, but makes debugging a bit easier when provided. |
Remarks
set the cache creation date to the moment the object is constructed this is important, because the date should stay fixed throughout the lifetime of this object but renew when it is updates
CustomDataSourceAdvanced(MyServicesBase<CustomDataSourceAdvanced.MyServices>, String)
Declaration
protected CustomDataSourceAdvanced(MyServicesBase<CustomDataSourceAdvanced.MyServices> services, string logName = null)
Parameters
Type | Name | Description |
---|---|---|
MyServicesBase<CustomDataSourceAdvanced.MyServices> | services | |
System.String | logName |
Properties
| Improve this Doc View SourceCacheTimestamp
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 SourceDataFactory
Declaration
[PublicApi]
protected IDataFactory DataFactory { get; }
Property Value
Type | Description |
---|---|
IDataFactory |