Beispiel #1
0
 public void Analyze()
 {
     FindAssemblies();
     FindTypes();
     FindRelations();
     AnalyzerLogger.Flush();
 }
Beispiel #2
0
        public void Analyze()
        {
            int      lineNumber = 0;
            FileInfo dotFile    = new FileInfo(_analyzerSettings.InputFilename);

            using (FileStream stream = dotFile.Open(FileMode.Open))
            {
                StreamReader sr = new StreamReader(stream);
                string       line;
                while ((line = sr.ReadLine()) != null)
                {
                    lineNumber++;
                    UpdateLineProgress(lineNumber, false);

                    if (line.Contains("->"))
                    {
                        string[] items = line.Split('"');
                        if (items.Length == 5)
                        {
                            string consumer = ReplaceNestedClassMarker(items[1]);
                            string provider = ReplaceNestedClassMarker(RemoveTrailingText(items[3]));

                            RegisterRelation(consumer, provider);
                        }
                    }
                }
            }
            UpdateLineProgress(lineNumber, true);
            AnalyzerLogger.Flush();
        }
Beispiel #3
0
        public void Analyze()
        {
            try
            {
                bool success = _repository.OpenFile(_analyzerSettings.InputFilename);
                if (success)
                {
                    _elementCount = 0;
                    for (short index = 0; index < _repository.Models.Count; index++)
                    {
                        EA.Package model = (EA.Package)_repository.Models.GetAt(index);
                        FindPackageElements(model);
                    }
                    UpdateElementProgress(true);

                    _relationCount = 0;
                    for (short index = 0; index < _repository.Models.Count; index++)
                    {
                        EA.Package model = (EA.Package)_repository.Models.GetAt(index);
                        FindPackageRelations(model);
                    }
                    UpdateRelationProgress(true);

                    _repository.CloseFile();
                }

                _repository.Exit();
            }
            catch (Exception e)
            {
                Logger.LogException($"Reading EA model failed file={_analyzerSettings.InputFilename}", e);
            }
            AnalyzerLogger.Flush();
        }
Beispiel #4
0
 public void Analyze()
 {
     FindSourceFiles();
     AnalyzeSourceFiles();
     RegisterSourceFiles();
     RegisterDirectIncludeRelations();
     AnalyzerLogger.Flush();
 }
Beispiel #5
0
 public void Analyze()
 {
     RegisterInterfaceFiles();
     AnalyzeSolution();
     RegisterSourceFiles();
     RegisterDirectIncludeRelations();
     RegisterGeneratedFileRelations();
     AnalyzerLogger.Flush();
 }
Beispiel #6
0
        public void Transform()
        {
            List <Action> actions = new List <Action>
            {
                new IncludeFilterAction(_model, _transformerSettings.IncludeFilterSettings, _progress),
                new MoveHeaderElementsAction(_model, _transformerSettings.MoveHeaderElementsSettings.Enabled, _progress),
                new MoveElementsAction(_model, _transformerSettings.MoveElementsSettings, _progress),
                new AddTransitiveRelationsAction(_model, _transformerSettings.AddTransitiveRelationsSettings.Enabled, _progress),
                new SplitProductAndTestElementsAction(_model, _transformerSettings.SplitProductAndTestElementsSettings, _progress)
            };

            foreach (Action action in actions)
            {
                _model.AddMetaData(action.Name, action.IsEnabled ? "Enabled" : "Disabled");
                action.Execute();
            }

            AnalyzerLogger.Flush();
        }