コード例 #1
0
        /// <summary>
        /// Visists the given visitor with the specified reference.
        /// </summary>
        public static bool Accept(IReferenceNode reference, ISolutionVisitor visitor)
        {
            if (visitor.VisitEnter(reference))
            {
                foreach (var node in reference.Nodes)
                {
                    if (!node.Accept(visitor))
                    {
                        break;
                    }
                }
            }

            return(visitor.VisitLeave(reference));
        }
コード例 #2
0
 /// <summary>
 /// Adapts a <see cref="IReferenceNode"/> 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 IReferenceNode reference) => reference.As <IVsHierarchy>();
コード例 #3
0
        /// <summary>
        /// Visists the given visitor with the specified reference.
        /// </summary>
        public static bool Accept(IReferenceNode reference, ISolutionVisitor visitor)
        {
            if (visitor.VisitEnter(reference))
            {
                foreach (var node in reference.Nodes)
                {
                    if (!node.Accept(visitor))
                        break;
                }
            }

            return visitor.VisitLeave(reference);
        }
コード例 #4
0
 /// <summary>
 /// Ends visiting a project reference.
 /// </summary>
 /// <param name="reference">The project reference being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the project reference siblings should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitLeave(IReferenceNode reference)
 {
     return(true);
 }
コード例 #5
0
 /// <summary>
 /// Begins visiting a project reference.
 /// </summary>
 /// <param name="reference">The project reference being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the project reference children should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitEnter(IReferenceNode reference)
 {
     return(true);
 }
コード例 #6
0
ファイル: SolutionVisitor.cs プロジェクト: sharwell/clide
 /// <summary>
 /// Begins visiting a project reference.
 /// </summary>
 /// <param name="reference">The project reference being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the project reference children should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitEnter(IReferenceNode reference) => true;
コード例 #7
0
 public bool VisitEnter(IReferenceNode reference) => false;
コード例 #8
0
		public bool VisitEnter(IReferenceNode reference) => false;
コード例 #9
0
 /// <summary>
 /// Begins visiting a project reference.
 /// </summary>
 /// <param name="reference">The project reference being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the project reference children should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitEnter(IReferenceNode reference)
 {
     return true;
 }
コード例 #10
0
 public bool VisitLeave(IReferenceNode reference)
 {
     throw new NotSupportedException();
 }
コード例 #11
0
ファイル: ISolutionNodeExtensions.cs プロジェクト: kzu/clide
		public bool VisitLeave (IReferenceNode reference)
		{
			throw new NotSupportedException ();
		}
コード例 #12
0
ファイル: SolutionVisitor.cs プロジェクト: kzu/clide
		/// <summary>
		/// Ends visiting a project reference.
		/// </summary>
		/// <param name="reference">The project reference being visited.</param>
		/// <returns>
		///   <see langword="true" /> if the project reference siblings should be visited; <see langword="false" /> otherwise.
		/// </returns>
		public virtual bool VisitLeave (IReferenceNode reference) => true;
コード例 #13
0
ファイル: SolutionVisitor.cs プロジェクト: kzu/clide
		/// <summary>
		/// Begins visiting a project reference.
		/// </summary>
		/// <param name="reference">The project reference being visited.</param>
		/// <returns>
		///   <see langword="true" /> if the project reference children should be visited; <see langword="false" /> otherwise.
		/// </returns>
		public virtual bool VisitEnter (IReferenceNode reference) => true;
コード例 #14
0
ファイル: SolutionVisitor.cs プロジェクト: sharwell/clide
 /// <summary>
 /// Ends visiting a project reference.
 /// </summary>
 /// <param name="reference">The project reference being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the project reference siblings should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitLeave(IReferenceNode reference) => true;
コード例 #15
0
 /// <summary>
 /// Adapts a <see cref="IReferenceNode"/> to a VsLang <see cref="Reference"/>.
 /// </summary>
 /// <returns>The <see cref="Reference"/> or <see langword="null"/> if conversion is not possible.</returns>
 public static Reference AsReference(this IReferenceNode reference) => reference.As <Reference>();
コード例 #16
0
 /// <summary>
 /// Ends visiting a project reference.
 /// </summary>
 /// <param name="reference">The project reference being visited.</param>
 /// <returns>
 ///   <see langword="true" /> if the project reference siblings should be visited; <see langword="false" /> otherwise.
 /// </returns>
 public virtual bool VisitLeave(IReferenceNode reference)
 {
     return true;
 }
コード例 #17
0
 /// <summary>
 /// Adapts a <see cref="IReferenceNode"/> 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 IReferenceNode reference) => reference.As <IVsHierarchyItem>();
コード例 #18
0
ファイル: NETGenerator.cs プロジェクト: CSRedRat/pascalabcnet
 private void AddrOfLocalVariableNode(IReferenceNode value)
 {
     VarInfo vi = helper.GetVariable(value.Variable);
     if (vi.kind == VarKind.vkLocal)
     {
         LocalBuilder lb = vi.lb;
         il.Emit(OpCodes.Ldloca, lb);
     }
     else if (vi.kind == VarKind.vkNonLocal)
     {
         FieldBuilder fb = vi.fb;
         MethInfo cur_mi = smi.Peek();
         int dist = (smi.Peek()).num_scope - vi.meth.num_scope;
         il.Emit(OpCodes.Ldloc, cur_mi.frame);
         for (int i = 0; i < dist; i++)
         {
             il.Emit(OpCodes.Ldfld, cur_mi.disp.parent);
             cur_mi = cur_mi.up_meth;
         }
         il.Emit(OpCodes.Ldflda, fb);
     }
 }
コード例 #19
0
		public bool VisitLeave(IReferenceNode reference) => false;
コード例 #20
0
 public virtual void Visit(IReferenceNode node)
 {
    DefaultVisit(node);
 }
コード例 #21
0
 public bool VisitLeave(IReferenceNode reference) => false;
コード例 #22
0
 /// <summary>
 /// Adapts the specified reference to supported target types.
 /// </summary>
 /// <param name="reference">The reference to adapt.</param>
 /// <returns>The entry point that exposes supported target types.</returns>
 public static IAdaptable <IReferenceNode> Adapt(this IReferenceNode reference)
 {
     return(new TreeNodeAdaptable <IReferenceNode>(reference));
 }