当前位置: 首页>>代码示例>>C#>>正文


C# NamespaceDeclaration.AcceptChildren方法代码示例

本文整理汇总了C#中ICSharpCode.NRefactory.Ast.NamespaceDeclaration.AcceptChildren方法的典型用法代码示例。如果您正苦于以下问题:C# NamespaceDeclaration.AcceptChildren方法的具体用法?C# NamespaceDeclaration.AcceptChildren怎么用?C# NamespaceDeclaration.AcceptChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ICSharpCode.NRefactory.Ast.NamespaceDeclaration的用法示例。


在下文中一共展示了NamespaceDeclaration.AcceptChildren方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: VisitNamespaceDeclaration

 public override object VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data)
 {
     CSharpLanguage.VisitorData data2 = (CSharpLanguage.VisitorData) data;
     data2.CurrentNamespaces.Push(namespaceDeclaration.Name);
     namespaceDeclaration.AcceptChildren(this, data2);
     data2.CurrentNamespaces.Pop();
     return null;
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:8,代码来源:CSharpLanguage.cs

示例2: VisitNamespaceDeclaration

 public override object VisitNamespaceDeclaration (NamespaceDeclaration node, object data)
 {
     if (!String.IsNullOrEmpty (Namespace))
         throw CreateException (node, "Nested namespaces are not supported");
     
     string prevNamespace = Namespace;
     //var prevUsings = Usings;
     
     Namespace = node.Name;
     //Usings = new HashSet<string> ();
     
     node.AcceptChildren (this, null);
     
     Namespace = prevNamespace;
     //Usings = prevUsings;
     
     return null;
 }
开发者ID:hallvar,项目名称:Joddes.CS,代码行数:18,代码来源:JsSourceInspector.cs

示例3: TrackedVisitNamespaceDeclaration

 public override object TrackedVisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data)
 {
     return namespaceDeclaration.AcceptChildren(this, data);
 }
开发者ID:L3tum,项目名称:BesiegeScriptingMod,代码行数:4,代码来源:NRefactoryToPythonConverter.cs

示例4: VisitNamespaceDeclaration

        public override object VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data)
        {
            CodeNamespace currentNamespace = new CodeNamespace(namespaceDeclaration.Name);
            //namespaces.Add(currentNamespace);
            // add imports from mother namespace
            foreach (CodeNamespaceImport import in ((CodeNamespace)namespaceDeclarations.Peek()).Imports) {
                currentNamespace.Imports.Add(import);
            }
            namespaceDeclarations.Push(currentNamespace);
            namespaceDeclaration.AcceptChildren(this, data);
            namespaceDeclarations.Pop();
            codeCompileUnit.Namespaces.Add(currentNamespace);

            // Nested namespaces are not allowed in CodeDOM
            return null;
        }
开发者ID:almazik,项目名称:ILSpy,代码行数:16,代码来源:CodeDOMOutputVisitor.cs

示例5: VisitNamespaceDeclaration

 public virtual object VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data)
 {
     Debug.Assert((namespaceDeclaration != null));
     return namespaceDeclaration.AcceptChildren(this, data);
 }
开发者ID:pusp,项目名称:o2platform,代码行数:5,代码来源:AbstractASTVisitor.cs

示例6: VisitNamespaceDeclaration

 public virtual bool VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object d)
 {
     if ((namespaceDeclaration == null)) {
         return SetFailure();
     }
     if ((d == null)) {
         return SetFailure();
     }
     if(namespaceDeclaration.GetType() != d.GetType()) {return SetFailure();}
     var data = (NamespaceDeclaration)d;
     if (!IsMatch(namespaceDeclaration, data)) {
         return SetFailure();
     }
     return namespaceDeclaration.AcceptChildren(this, d);
 }
开发者ID:jbuedel,项目名称:AgentRalphPlugin,代码行数:15,代码来源:AstComparisonVisitor.Generated.cs

示例7: TrackedVisitNamespaceDeclaration

		public override object TrackedVisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data)
		{
			currentNamespaceDeclaration = namespaceDeclaration;
			
			codeBuilder.AppendLineIfPreviousLineIsCode();
			AppendIndentedLine("module " + namespaceDeclaration.Name);
			
			IncreaseIndent();
			namespaceDeclaration.AcceptChildren(this, data);
			DecreaseIndent();
			
			AppendIndentedLine("end");
			
			return null;
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:15,代码来源:NRefactoryToRubyConverter.cs


注:本文中的ICSharpCode.NRefactory.Ast.NamespaceDeclaration.AcceptChildren方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。