• Basics
  • Abyss
  • Web APIs
  • C# & Razor
  • .net API
  • JS & TS API
Search Results for

    Show / Hide Table of Contents

    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 Source

    New(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 in on the newly created data source. If provided, it can also provide appIdentity and configSource

    IDataSourceOptions options

    optional configuration

    Returns
    Type Description
    T
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX