コード例 #1
0
ファイル: SolutionVisitable.cs プロジェクト: kzu/clide
        /// <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)
 {
 }
コード例 #6
0
 public bool VisitLeave(IReferencesNode references) => true;
コード例 #7
0
 public bool VisitEnter(IReferencesNode references) => false;
コード例 #8
0
		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
ファイル: ISolutionNodeExtensions.cs プロジェクト: kzu/clide
		public bool VisitLeave (IReferencesNode references)
		{
			throw new NotSupportedException ();
		}
コード例 #11
0
 public bool VisitLeave(IReferencesNode references)
 {
     throw new NotSupportedException();
 }
コード例 #12
0
ファイル: SolutionVisitor.cs プロジェクト: kzu/clide
		/// <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
ファイル: SolutionVisitor.cs プロジェクト: kzu/clide
		/// <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
ファイル: SolutionVisitor.cs プロジェクト: sharwell/clide
 /// <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
ファイル: SolutionVisitor.cs プロジェクト: sharwell/clide
 /// <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
ファイル: BehaviorAdapterFacade.cs プロジェクト: adalon/clide
 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;
 }
コード例 #21
0
		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));
 }