/*************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. This code is licensed under the Visual Studio SDK license terms. THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. ***************************************************************************/ using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; namespace Microsoft.VisualStudio.Project.Automation { /// /// Contains OAReferenceItem objects /// [SuppressMessage("Microsoft.Interoperability", "CA1405:ComVisibleTypeBaseTypesShouldBeComVisible")] [ComVisible(true), CLSCompliant(false)] public class OAReferenceFolderItem : OAProjectItem { #region ctors public OAReferenceFolderItem(OAProject project, ReferenceContainerNode node) : base(project, node) { } #endregion #region overridden methods /// /// Returns the project items collection of all the references defined for this project. /// public override EnvDTE.ProjectItems ProjectItems { get { return new OANavigableProjectItems(this.Project, this.GetListOfProjectItems(), this.Node); } } #endregion #region Helper methods private List GetListOfProjectItems() { List list = new List(); for(HierarchyNode child = this.Node.FirstChild; child != null; child = child.NextSibling) { ReferenceNode node = child as ReferenceNode; if(node != null) { list.Add(new OAReferenceItem(this.Project, node)); } } return list; } #endregion } }