Exemplo n.º 1
0
        /// <summary>
        /// Visists the given visitor with the specified solution item.
        /// </summary>
        public static bool Accept(ISolutionItemNode solutionItem, ISolutionVisitor visitor)
        {
            if (visitor.VisitEnter(solutionItem))
            {
                foreach (var node in solutionItem.Nodes)
                {
                    if (!node.Accept(visitor))
                        break;
                }
            }

            return visitor.VisitLeave(solutionItem);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Visists the given visitor with the specified solution item.
        /// </summary>
        public static bool Accept(ISolutionItemNode solutionItem, ISolutionVisitor visitor)
        {
            if (visitor.VisitEnter(solutionItem))
            {
                foreach (var node in solutionItem.Nodes)
                {
                    if (!node.Accept(visitor))
                    {
                        break;
                    }
                }
            }

            return(visitor.VisitLeave(solutionItem));
        }
		public bool VisitLeave(ISolutionItemNode solutionItem)
		{
			throw new NotSupportedException();
		}
Exemplo n.º 4
0
 /// <summary>
 /// Adapts a <see cref="ISolutionItemNode"/> to an <see cref="IVsHierarchyItem"/>.
 /// </summary>
 /// <returns>The <see cref="IVsHierarchyItem"/> or <see langword="null"/> if conversion is not possible.</returns>
 public static IVsHierarchyItem AsVsHierarchyItem(this ISolutionItemNode item) => item.As <IVsHierarchyItem>();
Exemplo n.º 5
0
 /// <summary>
 /// Ends visiting a solution item.
 /// </summary>
 /// <param name="solutionItem">The solution item being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the solution item siblings should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitLeave(ISolutionItemNode solutionItem)
 {
     return(true);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Begins visiting a solution item.
 /// </summary>
 /// <param name="solutionItem">The solution item being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the solution item children should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitEnter(ISolutionItemNode solutionItem)
 {
     return(true);
 }
 public virtual void Visit(ISolutionItemNode node)
 {
    DefaultVisit(node);
 }
 public bool VisitLeave(ISolutionItemNode solutionItem)
 {
     throw new NotSupportedException();
 }
Exemplo n.º 9
0
 /// <summary>
 /// Begins visiting a solution item.
 /// </summary>
 /// <param name="solutionItem">The solution item being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the solution item children should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitEnter(ISolutionItemNode solutionItem)
 {
     return true;
 }
Exemplo n.º 10
0
		public bool VisitEnter (ISolutionItemNode solutionItem) => false;
Exemplo n.º 11
0
		public bool VisitLeave (ISolutionItemNode solutionItem) => true;
Exemplo n.º 12
0
 // Don't traverse child items of a solution item.
 public bool VisitEnter(ISolutionItemNode solutionItem)
 {
     return(false);
 }
Exemplo n.º 13
0
		/// <summary>
		/// Begins visiting a solution item.
		/// </summary>
		/// <param name="solutionItem">The solution item being visited.</param>
		/// <returns>
		///   <see langword="true" /> if the solution item children should be visited; <see langword="false" /> otherwise.
		/// </returns>
		public virtual bool VisitEnter (ISolutionItemNode solutionItem) => true;
Exemplo n.º 14
0
 /// <summary>
 /// Begins visiting a solution item.
 /// </summary>
 /// <param name="solutionItem">The solution item being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the solution item children should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitEnter(ISolutionItemNode solutionItem) => true;
Exemplo n.º 15
0
 // Don't traverse child items of a solution item.
 public bool VisitEnter(ISolutionItemNode solutionItem) => false;
Exemplo n.º 16
0
 /// <summary>
 /// Ends visiting a solution item.
 /// </summary>
 /// <param name="solutionItem">The solution item being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the solution item siblings should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitLeave(ISolutionItemNode solutionItem)
 {
     return true;
 }
Exemplo n.º 17
0
 public bool VisitLeave(ISolutionItemNode solutionItem) => true;
 // Don't traverse child items of a solution item.
 public bool VisitEnter(ISolutionItemNode solutionItem)
 {
     return false;
 }