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
filterer
Type: Microsoft.VisualStudio.Data.DataConnectionDialogFilterCallbackA delegate called for each data source/provider combination to determine if the combination should be added.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.