示例#1
0
        /// <summary>
        /// Visists the given visitor with the specified solution.
        /// </summary>
        public static bool Accept(IReferencesNode references, ISolutionVisitor visitor)
        {
            if (visitor.VisitEnter(references))
            {
                foreach (var node in references.Nodes)
                {
                    if (!node.Accept(visitor))
                        break;
                }
            }

            return visitor.VisitLeave(references);
        }
示例#2
0
        /// <summary>
        /// Visists the given visitor with the specified solution.
        /// </summary>
        public static bool Accept(IReferencesNode references, ISolutionVisitor visitor)
        {
            if (visitor.VisitEnter(references))
            {
                foreach (var node in references.Nodes)
                {
                    if (!node.Accept(visitor))
                    {
                        break;
                    }
                }
            }

            return(visitor.VisitLeave(references));
        }
示例#3
0
 /// <summary>
 /// Begins visiting a project references.
 /// </summary>
 /// <param name="references">The project's references being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the project references siblings should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitLeave(IReferencesNode references)
 {
     return(true);
 }
示例#4
0
 /// <summary>
 /// Begins visiting a project references.
 /// </summary>
 /// <param name="references">The project's references being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the project references should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitEnter(IReferencesNode references)
 {
     return(true);
 }
示例#5
0
 public ReferenceContainerNode(IReferencesNode node)
     : this(node.OwningProject)
 {
 }
 public bool VisitLeave(IReferencesNode references) => true;
示例#7
0
 public bool VisitEnter(IReferencesNode references) => false;
		public bool VisitEnter(IReferencesNode references) => false;
示例#9
0
 /// <summary>
 /// Adapts a <see cref="IReferencesNode"/> 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 IReferencesNode references) => references.As <IVsHierarchyItem>();
示例#10
0
		public bool VisitLeave (IReferencesNode references)
		{
			throw new NotSupportedException ();
		}
 public bool VisitLeave(IReferencesNode references)
 {
     throw new NotSupportedException();
 }
示例#12
0
		/// <summary>
		/// Begins visiting a project references.
		/// </summary>
		/// <param name="references">The project's references being visited.</param>
		/// <returns>
		///   <see langword="true" /> if the project references siblings should be visited; <see langword="false" /> otherwise.
		/// </returns>
		public virtual bool VisitLeave (IReferencesNode references) => true;
示例#13
0
		/// <summary>
		/// Begins visiting a project references.
		/// </summary>
		/// <param name="references">The project's references being visited.</param>
		/// <returns>
		///   <see langword="true" /> if the project references should be visited; <see langword="false" /> otherwise.
		/// </returns>
		public virtual bool VisitEnter (IReferencesNode references) => true;
示例#14
0
 /// <summary>
 /// Begins visiting a project references.
 /// </summary>
 /// <param name="references">The project's references being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the project references siblings should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitLeave(IReferencesNode references) => true;
示例#15
0
 /// <summary>
 /// Begins visiting a project references.
 /// </summary>
 /// <param name="references">The project's references being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the project references should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitEnter(IReferencesNode references) => true;
示例#16
0
 /// <summary>
 /// Adapts a <see cref="IReferencesNode"/> to an <see cref="IVsHierarchy"/>.
 /// </summary>
 /// <returns>The <see cref="IVsHierarchy"/> or <see langword="null"/> if conversion is not possible.</returns>
 public static IVsHierarchy AsVsHierarchy(this IReferencesNode references) => references.As <IVsHierarchy>();
示例#17
0
 /// <summary>
 /// Adapts a <see cref="IReferencesNode"/> to a VsLang <see cref="References"/>.
 /// </summary>
 /// <returns>The <see cref="References"/> or <see langword="null"/> if conversion is not possible.</returns>
 public static References AsReferences(this IReferencesNode references) => references.As <References>();
示例#18
0
 internal static IReferenceContainerNode AsReferenceContainerNode(this IReferencesNode references) =>
 references.As <IReferenceContainerNode>();
示例#19
0
 public static void AddReference(this IReferencesNode references, IProjectNode projectReference) =>
 references.AsReferenceContainerNode().AddReference(projectReference);
示例#20
0
 /// <summary>
 /// Begins visiting a project references.
 /// </summary>
 /// <param name="references">The project's references being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the project references should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitEnter(IReferencesNode references)
 {
     return true;
 }
		public bool VisitLeave(IReferencesNode references) => true;
示例#22
0
 /// <summary>
 /// Begins visiting a project references.
 /// </summary>
 /// <param name="references">The project's references being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the project references siblings should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitLeave(IReferencesNode references)
 {
     return true;
 }
示例#23
0
 public bool VisitLeave(IReferencesNode references) => false;
示例#24
0
 /// <summary>
 /// Adapts the specified references to supported target types.
 /// </summary>
 /// <param name="references">The reference to adapt.</param>
 /// <returns>The entry point that exposes supported target types.</returns>
 public static IAdaptable <IReferencesNode> Adapt(this IReferencesNode references)
 {
     return(new TreeNodeAdaptable <IReferencesNode>(references));
 }