IVsDataConnectionDialog.AddSources Method (DataConnectionDialogFilterCallback)
Enumerates all registered data sources and their associated data providers, and conditionally adds source/provider combinations to the Choose/Change Data Source dialog box, depending on logic in the supplied callback.
Namespace: Microsoft.VisualStudio.Data.Services
Assembly: Microsoft.VisualStudio.Data.Services (in Microsoft.VisualStudio.Data.Services.dll)
Syntax
‘선언
Sub AddSources ( _
callback As DataConnectionDialogFilterCallback _
)
void AddSources(
DataConnectionDialogFilterCallback callback
)
void AddSources(
DataConnectionDialogFilterCallback^ callback
)
abstract AddSources :
callback:DataConnectionDialogFilterCallback -> unit
function AddSources(
callback : DataConnectionDialogFilterCallback
)
Parameters
- callback
Type: Microsoft.VisualStudio.Data.Services.DataConnectionDialogFilterCallback
A delegate called for each data source/provider combination to determine whether the combination should be added.
Remarks
This method allows a client to be selective about which data sources and providers are available in the Choose/Change Data Source dialog box. Using the callback method, they can selectively include or exclude certain sources or providers depending 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 Server Explorer. Because a Server Explorer connection requires implementation of the DataViewSupport support entity, the code that shows the dialog box 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.