/// <summary> /// Initializes a new instance of the <see cref="NamespaceASTWalker"/> class. /// </summary> protected NamespaceASTWalker(CSharpSyntaxNode node) { var namespaceSyntaxNode = node as NamespaceDeclarationSyntax; if (namespaceSyntaxNode == null) { throw new ArgumentException( string.Format("Specified node is not of type {0}", typeof(NamespaceDeclarationSyntax).Name)); } this.node = node; NamespaceDeclaration namespaceHelper = new NamespaceDeclaration(namespaceSyntaxNode); this.module = ModuleTranslationUnit.Create( IdentifierTranslationUnit.Create(namespaceHelper.Name)); }
/// <summary> /// Creates the translation unit. /// </summary> /// <remarks> /// Must return a type inheriting from <see cref="ModuleTranslationUnit"/>. /// </remarks> /// <param name="name"></param> /// <returns></returns> protected virtual ITranslationUnit CreateTranslationUnit(ITranslationUnit name) { return(ModuleTranslationUnit.Create(name)); }