Table of Contents

Interface IDataSourceGenerator<T>

Namespace
ToSic.Eav.Services
Assembly
ToSic.Eav.DataSource.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
  • Slimmed down in v21 to only accept Options, no more attach

Methods

New(IDataSourceOptions?)

Preferred way to create DataSources.

T New(IDataSourceOptions? options = null)

Parameters

options IDataSourceOptions

optional configuration

Returns

T