Microsoft.VisualStudio.Project.ProjectNode.GetComponentPickerDirectories C# (CSharp) Method

GetComponentPickerDirectories() private method

private GetComponentPickerDirectories ( ) : string
return string
        private string GetComponentPickerDirectories()
        {
            IVsComponentEnumeratorFactory4 enumFactory = this.site.GetService(typeof(SCompEnumService)) as IVsComponentEnumeratorFactory4;
            if (enumFactory == null)
            {
                throw new InvalidOperationException("Missing the SCompEnumService service.");
            }

            IEnumComponents enumerator;
            Marshal.ThrowExceptionForHR(enumFactory.GetReferencePathsForTargetFramework(this.TargetFrameworkMoniker.FullName, out enumerator));
            if (enumerator == null)
            {
                throw new ApplicationException("IVsComponentEnumeratorFactory4.GetReferencePathsForTargetFramework returned null.");
            }

            StringBuilder paths = new StringBuilder();
            VSCOMPONENTSELECTORDATA[] data = new VSCOMPONENTSELECTORDATA[1];
            uint fetchedCount;
            while (enumerator.Next(1, data, out fetchedCount) == VSConstants.S_OK && fetchedCount == 1)
            {
                Debug.Assert(data[0].type == VSCOMPONENTTYPE.VSCOMPONENTTYPE_Path);
                paths.Append(data[0].bstrFile);
                paths.Append(";");
            }

            // Trim off the last semicolon.
            if (paths.Length > 0)
            {
                paths.Length -= 1;
            }

            return paths.ToString();
        }
ProjectNode