Exemplo n.º 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);
        }
Exemplo n.º 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));
        }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 5
0
 public ReferenceContainerNode(IReferencesNode node)
     : this(node.OwningProject)
 {
 }
 public bool VisitLeave(IReferencesNode references) => true;
Exemplo n.º 7
0
 public bool VisitEnter(IReferencesNode references) => false;
		public bool VisitEnter(IReferencesNode references) => false;
Exemplo n.º 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>();
Exemplo n.º 10
0
		public bool VisitLeave (IReferencesNode references)
		{
			throw new NotSupportedException ();
		}
Exemplo n.º 11
0
 public bool VisitLeave(IReferencesNode references)
 {
     throw new NotSupportedException();
 }
Exemplo n.º 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;
Exemplo n.º 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;
Exemplo n.º 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;
Exemplo n.º 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;
Exemplo n.º 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>();
Exemplo n.º 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>();
Exemplo n.º 18
0
 internal static IReferenceContainerNode AsReferenceContainerNode(this IReferencesNode references) =>
 references.As <IReferenceContainerNode>();
Exemplo n.º 19
0
 public static void AddReference(this IReferencesNode references, IProjectNode projectReference) =>
 references.AsReferenceContainerNode().AddReference(projectReference);
Exemplo n.º 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;
Exemplo n.º 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;
 }
Exemplo n.º 23
0
 public bool VisitLeave(IReferencesNode references) => false;
Exemplo n.º 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));
 }