Table of Contents

Interface IDataSourceGenerator<T>

Namespace
ToSic.Eav.Services
Assembly
ToSic.Eav.DataSources.dll

A factory/generator to create one specific kind of data source.

Note: This is not meant for use in Razor code, but to be used in custom DataSources which may need other internal data sources to work.

Where possible, use the Generator instead of the IDataSourcesService. The Generator makes it clearer when you only need to use a single typed DataSource and not need access to all kinds of DataSources.

[PublicApi]
public interface IDataSourceGenerator<out T> where T : IDataSource

Type Parameters

T

The type of the data source to be created.

Remarks

Released in v15.06

Methods

New(IDataSourceLinkable, IDataSourceOptions)

Preferred way to create DataSources.

T New(IDataSourceLinkable attach = null, IDataSourceOptions options = null)

Parameters

attach IDataSourceLinkable

optional source to attach as in on the newly created data source. If provided, it can also provide appIdentity and configSource

options IDataSourceOptions

optional configuration

Returns

T