private void ParseImportDeclarations()
 {
     for (int i = 0; i < File.Count; i++)
     {
         int               lineIndexer       = i;
         string            line              = File[i];
         ImportDeclaration importDeclaration = null;
         try
         {
             if (line.Contains("Imports"))
             {
                 importDeclaration = new ImportDeclaration(lineIndexer, line);
             }
             else
             {
                 continue;
             }
         }
         catch (InvalidOperationException)
         {
             continue;
         }
         DeclaredNamespaces.Add(importDeclaration);
     }
 }
예제 #2
0
 public override void VisitNamespaceDeclaration(NamespaceDeclarationSyntax Node)
 {
     base.VisitNamespaceDeclaration(Node);
     DeclaredNamespaces.Add(Node.Name.ToString());
 }