コード例 #1
0
        private void AnalyzeNamespaceDeclaration(IModuleDeclaration source)
        {
            // Namespace name could be chained together in a form of 'namespace A.B'
            // in this case we need to get full name, not just source.Name.Text
            string fullName = string.Join(".", source.GetFullName());

            AddOrCreateDeclarationSymbol(SymbolKind.NamespaceDeclaration, fullName);

            using (m_currentLocationStack.AutoPush(fullName))
            {
                AnalyzeDeclarationStatements(source.GetModuleBlock().Statements);
            }
        }
コード例 #2
0
 /// <summary>
 /// Returns a full name for compound namespace.
 /// </summary>
 /// <remarks>
 /// This method returns A.B for 'namespace A.B {}' declaration.
 /// </remarks>
 public static string GetFullNameString(this IModuleDeclaration moduleDeclaration)
 {
     return(string.Join(".", moduleDeclaration.GetFullName()));
 }