Microsoft.Samples.VisualStudio.SourceControlIntegration.SccProvider.SccProvider.GetSolutionFoldersEnum C# (CSharp) Method

GetSolutionFoldersEnum() public method

Returns a list of solution folders projects in the solution
public GetSolutionFoldersEnum ( ) : Hashtable
return System.Collections.Hashtable
        public Hashtable GetSolutionFoldersEnum()
        {
            Hashtable mapHierarchies = new Hashtable();

            IVsSolution sol = (IVsSolution)GetService(typeof(SVsSolution));
            Guid rguidEnumOnlyThisType = guidSolutionFolderProject;
            IEnumHierarchies ppenum = null;
            ErrorHandler.ThrowOnFailure(sol.GetProjectEnum((uint)__VSENUMPROJFLAGS.EPF_LOADEDINSOLUTION, ref rguidEnumOnlyThisType, out ppenum));

            IVsHierarchy[] rgelt = new IVsHierarchy[1];
            uint pceltFetched = 0;
            while (ppenum.Next(1, rgelt, out pceltFetched) == VSConstants.S_OK &&
                   pceltFetched == 1)
            {
                mapHierarchies[rgelt[0]] = true;
            }

            return mapHierarchies;
        }