private List<Namespace> GetFileMismatchedNamespaces(SourceFile file)
 {
     List<Namespace> fileResult = new List<Namespace>();
     string getExpectedNamespace = GetExpectedNamespace(file);
     foreach (Namespace nameSpace in file.AllNamespaces)
     {
         if (nameSpace.Name != getExpectedNamespace)
             fileResult.Add(nameSpace);
         foreach (TypeDeclaration type in nameSpace.AllTypes)
         {
             ReferenceSearcher typeReferenceSearcher = new ReferenceSearcher();
             LanguageElementCollection allReferences = typeReferenceSearcher.FindReferences(nameSpace.Solution as SolutionElement, type);
             foreach (LanguageElement reference in allReferences)
             {
                 string fileName = reference.FileNode.Name;
                 if (!_TypesFound.ContainsKey(fileName))
                     _TypesFound.Add(fileName, new List<TypeDeclaration>());
                 if (_TypesFound[fileName].IndexOf(type) >= 0)
                     continue;
                 _TypesFound[fileName].Add(type);
             }
         }
     }
     return fileResult;
 }
 private static LanguageElementCollection FindAllReferences(Namespace nameSpace)
 {
     ReferenceSearcher referenceSearcher = new ReferenceSearcher();
     LanguageElementCollection findReferences = referenceSearcher.FindReferences(nameSpace.Solution as LanguageElement, nameSpace);
     return findReferences;
 }