Compartilhar via


VsShellUtilities.GetCfgProvider(IVsHierarchy) Method

Definition

Utility function to retreive the config provider object for a given project. It will use the established (by build manager) alghoritm fo accessing the config provider

  1. If project provides a browse object - QI from the browse object
  2. else if project implements IVsGetCfgProvider - use IVsGetCfgProvider::GetCfgProvider()
  3. finally QI for IVsCfgProvider on the project hierarchy itself.
public:
 static Microsoft::VisualStudio::Shell::Interop::IVsCfgProvider ^ GetCfgProvider(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ hierarchy);
public:
 static Microsoft::VisualStudio::Shell::Interop::IVsCfgProvider ^ GetCfgProvider(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ hierarchy);
 static Microsoft::VisualStudio::Shell::Interop::IVsCfgProvider GetCfgProvider(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & hierarchy);
public static Microsoft.VisualStudio.Shell.Interop.IVsCfgProvider GetCfgProvider (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy hierarchy);
static member GetCfgProvider : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy -> Microsoft.VisualStudio.Shell.Interop.IVsCfgProvider
Public Shared Function GetCfgProvider (hierarchy As IVsHierarchy) As IVsCfgProvider
Public Function GetCfgProvider (hierarchy As IVsHierarchy) As IVsCfgProvider

Parameters

hierarchy
IVsHierarchy

The project hierarchy

Returns

IVsCfgProvider object for the given project

Remarks

This method uses the established (by build manager) algorithm for accessing the configuration provider:

  1. If the project provides a browse object, QI from the browse object.

  2. Otherwise, if the project implements IVsGetCfgProvider, use GetCfgProvider

  3. Otherwise, QI for IVsCfgProvider

Applies to