Microsoft.VisualStudio.Project.ProjectReferenceNode.CanShowDefaultIcon C# (CSharp) Method

CanShowDefaultIcon() protected method

Defines whether this node is valid node for painting the refererence icon.
protected CanShowDefaultIcon ( ) : bool
return bool
        protected override bool CanShowDefaultIcon()
        {
            if(this.referencedProjectGuid == Guid.Empty || this.ProjectMgr == null || this.ProjectMgr.IsClosed || this.isNodeValid)
            {
                return false;
            }

            IVsHierarchy hierarchy = null;

            hierarchy = VsShellUtilities.GetHierarchy(this.ProjectMgr.Site, this.referencedProjectGuid);

            if(hierarchy == null)
            {
                return false;
            }

            //If the Project is unloaded return false
            if(this.ReferencedProjectObject == null)
            {
                return false;
            }

            return (!String.IsNullOrEmpty(this.referencedProjectFullPath) && File.Exists(this.referencedProjectFullPath));
        }