Interface IRVDataSourceProvider

The interface that must be implemented and returned in to replace data sources when a dashboard is opened. See 'Replacing data sources' in the developer guide for more information.

Namespace: Reveal.Sdk
Assembly: Infragistics.Reveal.SDK.Server.dll
Syntax
public interface IRVDataSourceProvider

Methods

ChangeDataSourceAsync(IRVUserContext, RVDashboardDataSource)

This method can be used to replace the data source, returning null indicates Reveal to use the original data source stored in the dashboard.

Declaration
virtual Task<RVDashboardDataSource> ChangeDataSourceAsync(IRVUserContext userContext, RVDashboardDataSource dataSource)
Parameters
Type Name Description
IRVUserContext userContext

The user context of the user requesting the data

RVDashboardDataSource dataSource

Information about the data source being used, like the host name for a database, etc.

Returns
Type Description
System.Threading.Tasks.Task<RVDashboardDataSource>

ChangeDataSourceItemAsync(IRVUserContext, String, RVDataSourceItem)

This method can be used to replace the data source, returning null indicates Reveal to use the original data source stored in the dashboard. This method will be invoked every time data is requested for a dashboard, which can be quite frequent. If the method is slow, it will make all data requests slow. In that case, consider caching whatever information is required for this method to return quickly.

Declaration
Task<RVDataSourceItem> ChangeDataSourceItemAsync(IRVUserContext userContext, string dashboardId, RVDataSourceItem dataSourceItem)
Parameters
Type Name Description
IRVUserContext userContext

The user context of the user requesting the data

System.String dashboardId

The ID of the dashboard. Will be null if there's no dashboard in context.

RVDataSourceItem dataSourceItem

Information about the data source being used, like the name of the table, database, etc.

Returns
Type Description
System.Threading.Tasks.Task<RVDataSourceItem>

The new data source to use or null to use the original data source