i want to develop a Visual Studio Extension.
Therefore i need all Databases that are connected via Visual Studio Sql Server Object Explorer. I want to connect to some of them during my programm execution.
I already tried to get all connected databases via
System.Data.Sql.SqlDataSourceEnumerator.Instance.GetDataSources();
But the result is not the right set of databases.
If its possible to get all the information about the connected Databases my program should like:
var databases = GetAllConnectedDatabases();
foreach (database in databases)
{
database.Connect();
// do something
}
Is it possible to get information about all Sql-Servers i connected via Visual Studio Sql Server Object Explorer?
Thanks for your help.