/// <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); }
/// <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)); }
/// <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); }
/// <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 ReferenceContainerNode(IReferencesNode node) : this(node.OwningProject) { }
public bool VisitLeave(IReferencesNode references) => true;
public bool VisitEnter(IReferencesNode references) => false;
/// <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>();
public bool VisitLeave (IReferencesNode references) { throw new NotSupportedException (); }
public bool VisitLeave(IReferencesNode references) { throw new NotSupportedException(); }
/// <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;
/// <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;
/// <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;
/// <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;
/// <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>();
/// <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>();
internal static IReferenceContainerNode AsReferenceContainerNode(this IReferencesNode references) => references.As <IReferenceContainerNode>();
public static void AddReference(this IReferencesNode references, IProjectNode projectReference) => references.AsReferenceContainerNode().AddReference(projectReference);
/// <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; }
/// <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; }
public bool VisitLeave(IReferencesNode references) => false;
/// <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)); }