Table of Contents

Base Classes for Custom DataSources 🆕 v16

you are here (click to zoom) - discover the stack

This is an overview as to the base classes you can inherit from when creating a custom DataSource.

DataSource16

Dynamic DataSources always inherit from Custom.DataSource.DataSource16.

This is the easiest base class to use and the easiest to learn. You can see it live on Dynamic DataSources Tutorials.

It does a few things automatically for you, such as:

  1. It automatically registers the DataSource in the VisualQuery with some very good defaults
  2. It provides special ProvideOut methods which allow you to give it various kinds of data, such as
    1. a single anonymous object or a list thereof
    2. a single RawEntity or a list thereof
    3. a single IEntity or a list thereof
  3. In most cases it also automatically parses configurations the way you expect it to.

Internally the DataSource16 uses the CustomDataSource.

CustomDataSource

The CustomDataSource is the base class for most custom Compiled DataSources.

It has the same benefits as the DataSource16 except for the automatic registration in the VisualQuery.

CustomDataSourceAdvanced

The CustomDataSourceAdvanced is a more bare-bones base class to use in advanced use cases. It's used a lot internally, but we don't recommend using it.

DataSourceBase

The DataSourceBase is the base class for all DataSources. It's documented because you should know about the API, but we don't recommend that you inherit from it.


History

  1. Introduced a long time ago
  2. Completely reorganized and renamed in 2sxc 15/16