Interface IDataSourceGenerator<T>
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.
Namespace: ToSic.Eav.Services
Assembly: ToSic.Eav.DataSources.dll
Syntax
[PublicApi]
public interface IDataSourceGenerator<out T> where T : IDataSource
Type Parameters
Name | Description |
---|---|
T | The type of the data source to be created. |
Remarks
Released in v15.06
Methods
| Improve this Doc View SourceNew(IDataSourceLinkable, IDataSourceOptions)
Preferred way to create DataSources.
Declaration
T New(IDataSourceLinkable attach = null, IDataSourceOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
IDataSourceLinkable | attach | optional source to attach as |
IDataSourceOptions | options | optional configuration |
Returns
Type | Description |
---|---|
T |