/// <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> protected internal override bool IsAlreadyAdded(out ReferenceNode existingReference) { 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) { ComReferenceNode referenceNode = n as ComReferenceNode; if (referenceNode != null) { // We check if the name and guids are the same if (referenceNode.TypeGuid == this.TypeGuid && referenceNode.WrapperTool == this.WrapperTool && referenceNode.MajorVersionNumber == this.MajorVersionNumber && referenceNode.MinorVersionNumber == this.MinorVersionNumber) { existingReference = referenceNode; return(true); } } } existingReference = null; return(false); }
/// <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> protected override bool IsAlreadyAdded() { 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) { ComReferenceNode refererenceNode = n as ComReferenceNode; if (refererenceNode != null) { // We check if the name and guids are the same if (refererenceNode.TypeGuid == this.TypeGuid && String.Compare(refererenceNode.Caption, this.Caption, StringComparison.OrdinalIgnoreCase) == 0) { return(true); } } } return(false); }
/// <summary> /// Checks if a reference is already added. The method parses all references and compares the FinalItemSpec and the GUID. /// </summary> /// <returns>true if the assembly has already been added.</returns> public override bool IsAlreadyAdded(out ReferenceNode existingEquivalentNode) { ReferenceContainerNode referencesFolder = this.ProjectManager.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) { ComReferenceNode referenceNode = n as ComReferenceNode; if (referenceNode != null) { // We check if the name and GUIDs are the same if (referenceNode.TypeGuid == this.TypeGuid && String.Equals(referenceNode.Caption, this.Caption, StringComparison.OrdinalIgnoreCase)) { existingEquivalentNode = referenceNode; return(true); } } } existingEquivalentNode = null; return(false); }
/// <summary> /// Creates a com reference node from a selector data. /// </summary> protected virtual ComReferenceNode CreateComReferenceNode(Microsoft.VisualStudio.Shell.Interop.VSCOMPONENTSELECTORDATA selectorData, string wrapperTool) { ComReferenceNode node = new ComReferenceNode(this.ProjectManager, selectorData); return(node); }
public ComReferenceProperties(ComReferenceNode node) : base(node) { }
/// <summary> /// Creates a com reference node from a selector data. /// </summary> protected virtual ComReferenceNode CreateComReferenceNode(Microsoft.VisualStudio.Shell.Interop.VSCOMPONENTSELECTORDATA selectorData, string wrapperTool = null) { ComReferenceNode node = new ComReferenceNode(this.ProjectMgr, selectorData); return node; }
public ComReferenceProperties(ComReferenceNode node) : base(node) { }