示例#1
0
 public static void AddKnownNamespaces(SDRepository sdRepository)
 {
     sdRepository.AddNamespace(new SDNamespace("System")
     {
         IsProjectStranger = true
     });
 }
示例#2
0
        private void StructureParseNamespaces(CSharpProject project, SDRepository sdRepository)
        {
            var types = project.Compilation.MainAssembly.TopLevelTypeDefinitions.ToList();

            for (int j = 0; j < types.Count; j++)
            {
                PostParseMessage(_parserStrings.ParsingNamespace + ": " + types[j].Namespace);

                var sdNamespace = new SDNamespace(types[j].Namespace);
                sdRepository.AddNamespace(sdNamespace);
            }
        }
        private void ParseNamespaces()
        {
            var pi = 0;

            for (int i = 0; i < _solution.Projects.Count; i++)
            {
                pi = i;
                var types = _solution.Projects[i].Compilation.MainAssembly.TopLevelTypeDefinitions.ToList();
                for (int j = 0; j < types.Count; j++)
                {
                    PostProgress(_sdBuildStrings.ParsingNamespace + ": " + types[j].Namespace, j, types.Count, pi, _solution.Projects.Count);

                    var sdNamespace = new SDNamespace(types[j].Namespace);
                    _repository.AddNamespace(sdNamespace);
                }
            }
        }