ServiceClientGenerator.SolutionFileCreator.ScanForExistingProjects C# (CSharp) Method

ScanForExistingProjects() private method

Scans the SDK source and test folder locations to detect existing projects that follow our naming convention, adding them to the set of all projects to be processed into the solution files.
private ScanForExistingProjects ( ) : void
return void
        private void ScanForExistingProjects()
        {
            const string awssdkProjectNamePattern = "AWSSDK.*.*proj";

            var foldersToProcess = new[]
            {
                Path.Combine(Options.SdkRootFolder, GeneratorDriver.SourceSubFoldername),
                Path.Combine(Options.SdkRootFolder, GeneratorDriver.TestsSubFoldername)
            };

            foreach (var rootFolder in foldersToProcess)
            {
                foreach (var projectFile in Directory.GetFiles(rootFolder, awssdkProjectNamePattern, SearchOption.AllDirectories))
                {
                    var projectName = Path.GetFileNameWithoutExtension(projectFile);
                    if (_allProjects.ContainsKey(projectName))
                        continue;

                    var projectConfig = new ProjectFileCreator.ProjectConfigurationData
                    {
                        ProjectGuid = Utils.GetProjectGuid(projectFile),
                        ConfigurationPlatforms = GetProjectPlatforms(projectName)
                    };

                    _allProjects.Add(projectName, projectConfig);
                }
            }
        }