private void OnReferenceChanged(object sender, HierarchyNodeEventArgs args)
        {
            // Check if there is any sink for this event.
            if (null == ReferenceChanged)
            {
                return;
            }

            // The sender of this event should be the reference node that was changed
            TEntryPointFileNode refNode = sender as TEntryPointFileNode;

            if (null == refNode)
            {
                return;
            }


            // Check that the removed item implements the Reference interface.
            Reference reference = refNode.Object as Reference;

            if (null != reference)
            {
                ReferenceChanged(reference);
            }
        }
        private Reference AddFromSelectorData(VSCOMPONENTSELECTORDATA selector)
        {
            TEntryPointFileNode refNode = container.AddReferenceFromSelectorData(selector);

            if (null == refNode)
            {
                return(null);
            }

            return(refNode.Object as Reference);
        }
        public IEnumerator GetEnumerator()
        {
            List <Reference> references = new List <Reference>();
            IEnumerator      baseEnum   = container.EnumReferences().GetEnumerator();

            if (null == baseEnum)
            {
                return(references.GetEnumerator());
            }
            while (baseEnum.MoveNext())
            {
                TEntryPointFileNode refNode = baseEnum.Current as TEntryPointFileNode;
                if (null == refNode)
                {
                    continue;
                }
                Reference reference = refNode.Object as Reference;
                if (null != reference)
                {
                    references.Add(reference);
                }
            }
            return(references.GetEnumerator());
        }