Share via


DataConnectionDialog.AddSources Method (DataConnectionDialogFilterCallback)

Enumerates all registered data sources and their associated data providers, and conditionally adds source/provider combinations to the Data Connection dialog box based on logic in the supplied callback.

Namespace:  Microsoft.VisualStudio.Data
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

'Declaration
Public MustOverride Sub AddSources ( _
    filterer As DataConnectionDialogFilterCallback _
)
public abstract void AddSources(
    DataConnectionDialogFilterCallback filterer
)
public:
virtual void AddSources(
    DataConnectionDialogFilterCallback^ filterer
) abstract
abstract AddSources : 
        filterer:DataConnectionDialogFilterCallback -> unit
public abstract function AddSources(
    filterer : DataConnectionDialogFilterCallback
)

Parameters

Remarks

This method allows a client to be very selective about what data sources and providers are available on the Data Connection dialog box. Using the callback method they can selectively include or exclude certain sources or providers based on arbitrary logic.

For example, you could use this method to determine which data providers should be shown when adding a given data connection to the Server Explorer. Since a Server Explorer connection requires implementation of the DataViewSupport support entity, the code that shows the dialog for this purpose could filter out all providers that do not support this entity.

.NET Framework Security

See Also

Reference

DataConnectionDialog Class

AddSources Overload

Microsoft.VisualStudio.Data Namespace