PHPAnalysis.Program.ImportExternalComponents C# (CSharp) Метод

ImportExternalComponents() приватный статический Метод

private static ImportExternalComponents ( ComponentConfiguration configuration ) : ComponentContainer
configuration ComponentConfiguration
Результат PHPAnalysis.Components.ComponentContainer
        private static ComponentContainer ImportExternalComponents(ComponentConfiguration configuration)
        {
            if (!configuration.IncludeComponents)
            {
                return new ComponentContainer();
            }
            try
            {
                var importer = new ComponentImporter();
                var components = importer.ImportComponents(configuration.ComponentPath);

                Console.WriteLine("Components:");
                Console.WriteLine("  Found {0} visitors.", components.AstVisitors.Count);
                Console.WriteLine("  Found {0} block analyzers.", components.BlockAnalyzers.Count);
                Console.WriteLine("  Found {0} reporters.", components.VulnerabilityReporters.Count);
                Console.WriteLine("  Found {0} taint providers.", components.TaintProviders.Count);

                return components;
            }
            catch (DirectoryNotFoundException)
            {
                Console.WriteLine("EXTERNAL COMPONENTS ERROR: ");
                Console.WriteLine("Could not find specified component folder ({0}). Please make sure to set the correct folder in the config file.", configuration.ComponentPath);
                Environment.Exit(1);
                return null;
            }
        }