/// <summary>
        /// Checks if a reference is already added. The method parses all references and compares the the FinalItemSpec and the Guid.
        /// </summary>
        /// <returns>true if the assembly has already been added.</returns>
        public /*protected, but public for FSharp.Project.dll*/ override bool IsAlreadyAdded(out ReferenceNode existingNode)
        {
            ReferenceContainerNode referencesFolder = this.ProjectMgr.FindChild(ReferenceContainerNode.ReferencesNodeVirtualName) as ReferenceContainerNode;

            Debug.Assert(referencesFolder != null, "Could not find the References node");

            for (HierarchyNode n = referencesFolder.FirstChild; n != null; n = n.NextSibling)
            {
                if (n is ComReferenceNode)
                {
                    ComReferenceNode referenceNode = n as ComReferenceNode;

                    // We check if the name and guids are the same
                    if (referenceNode.TypeGuid == this.TypeGuid && String.Compare(referenceNode.Caption, this.Caption, StringComparison.OrdinalIgnoreCase) == 0)
                    {
                        existingNode = referenceNode;
                        return(true);
                    }
                }
            }

            existingNode = null;
            return(false);
        }
 /// <summary>
 /// Creates a com reference node from a selector data.
 /// </summary>
 public virtual ComReferenceNode CreateComReferenceNode(Microsoft.VisualStudio.Shell.Interop.VSCOMPONENTSELECTORDATA selectorData)
 {
     ComReferenceNode node = new ComReferenceNode(this.ProjectMgr, selectorData);
     return node;
 }
        /// <summary>
        /// Creates a com reference node from a selector data.
        /// </summary>
        public /*protected, but public for FSharp.Project.dll*/ virtual ComReferenceNode CreateComReferenceNode(Microsoft.VisualStudio.Shell.Interop.VSCOMPONENTSELECTORDATA selectorData)
        {
            ComReferenceNode node = new ComReferenceNode(this.ProjectMgr, selectorData);

            return(node);
        }