Class CustomDataSource
- Namespace
- ToSic.Eav.DataSource
- Assembly
- ToSic.Eav.DataSource.dll
DataSource base for lightweight data sources which are quite simple and convention based.
[PublicApi]
public class CustomDataSource : DataSourceBase, IDataSource, IAppIdentity, IZoneIdentity, IAppIdentityLight, ICacheKey, ICacheExpiring, ITimestamped, IHasLog, IDataSourceLinkable, IServiceWithSetup<IDataSourceOptions>
- Inheritance
-
objectCustomDataSource
- Implements
-
IServiceWithSetup<IDataSourceOptions>
- Derived
- Inherited Members
Constructors
CustomDataSource(Dependencies, string?, object[]?)
Constructor for creating a Custom DataSource.
protected CustomDataSource(CustomDataSource.Dependencies services, string? logName = null, object[]? connect = null)
Parameters
servicesCustomDataSource.DependenciesAll the needed services - see Convention: Dependencies Class
logNamestringOptional name for logging such as
My.JsonDSconnectobject[]
Properties
Immutable
Every new DataSource based on this is immutable.
public override bool Immutable { get; }
Property Value
Methods
GetDefault()
Default method called to return data. If the inheriting class overrides this, it can go without having a full constructor.
protected virtual IEnumerable<IRawData> GetDefault()