Table of Contents

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
object
CustomDataSource
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

services CustomDataSource.Dependencies

All the needed services - see Convention: Dependencies Class

logName string

Optional name for logging such as My.JsonDS

connect object[]

Properties

Immutable

Every new DataSource based on this is immutable.

public override bool Immutable { get; }

Property Value

bool

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()

Returns

IEnumerable<IRawData>