Share via


IVsDataProviderManager Interface

Exposes the DDEX Provider Manager service, which allows discovery of registered DDEX providers.

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

Syntax

'Declaration
<GuidAttribute("F8B01F14-9F78-4506-80A8-3534837AF0D4")> _
Public Interface IVsDataProviderManager
[GuidAttribute("F8B01F14-9F78-4506-80A8-3534837AF0D4")]
public interface IVsDataProviderManager
[GuidAttribute(L"F8B01F14-9F78-4506-80A8-3534837AF0D4")]
public interface class IVsDataProviderManager
[<GuidAttribute("F8B01F14-9F78-4506-80A8-3534837AF0D4")>]
type IVsDataProviderManager =  interface end
public interface IVsDataProviderManager

The IVsDataProviderManager type exposes the following members.

Properties

  Name Description
Public property Providers Gets a dictionary of all registered DDEX providers.

Top

Remarks

DDEX providers register their existence for a particular installation of Visual Studio by adding specific registry keys in the Visual Studio local registry hive. The DDEX Provider Manager service enumerates these providers and supplies the list of registered providers to the caller. It also performs additional work to ensure that each provider is registered correctly. Information about providers that are not registered correctly is logged in the Windows event log, and the provider is not returned to the caller. The following registration characteristics are verified by this service:

  • The provider’s registry key under the DataProviders key is a valid GUID consisting of 32 digits separated by hyphens, enclosed in brackets ({xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}).

  • The provider’s Technology registry value, if specified, is a valid GUID.

  • If the provider is registry-based:

    • The CodeBase registry value exists and it points to an existing file in the file system.
  • If the provider is package-based:

    • The FactoryService registry value exists and is a valid GUID.

    • The package that offers the service identified by the FactoryService registry value is registered.

Note that certain editions of Visual Studio restrict which providers are available. For example, the Express editions allow only a small subset of the Microsoft DDEX providers. These restrictions are for business purposes and override any entries that may have been added in addition to those providers that are allowed by the edition. A given DDEX provider may dynamically determined whether they are supported under the current environment by implementing the IVsDataProviderDynamicSupport support entity. If a provider is deemed unsupported by the edition or current environment, it is not returned by this service.

The DDEX Provider Manager service is a global Visual Studio service that is registered with the environment and can thus be accessed by requesting the service from a global service provider object.

Examples

The following code demonstrates how a client can retrieve the DDEX Provider Manager service from a global Visual Studio service provider and enumerate the set of DDEX providers registered in the environment.

using System;
using System.Diagnostics;
using Microsoft.VisualStudio.Data.Core;

public class DDEX_IVsDataProviderExample1
{
    public static void EnumerateProviders(IServiceProvider serviceProvider)
    {
        IVsDataProviderManager providerManager =
            serviceProvider.GetService(typeof(IVsDataProviderManager))
                as IVsDataProviderManager;
        foreach (IVsDataProvider provider in providerManager.Providers.Values)
        {
            Trace.WriteLine(provider.Name);
        }
    }
}

See Also

Reference

Microsoft.VisualStudio.Data.Core Namespace