-
Notifications
You must be signed in to change notification settings - Fork 0
Implement new Enumerator class for unified solution and project file enumeration with ProjCfg support #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: beta
Are you sure you want to change the base?
Conversation
Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com>
…tion Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com>
…mentation Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com>
|
@copilot can you add another enumerator method to Enumerator class which performs the same logic as EnumerateProjectPaths but a) returns ProjCfg (look at SlnParser.ParseSolution) . it also needs to perform the same logic as SlnParser (enumerating projects in order and extracr configurations_ |
Co-authored-by: dlosch <318550+dlosch@users.noreply.github.com>
I've added the Key Features:
Usage: await foreach (var projCfg in enumerator.EnumerateProjCfg(path, EnumerationType.Sln)) {
// Process ProjCfg with configuration and platform information
}The implementation replicates SlnParser's logic for project ordering and configuration extraction. All tests pass, including comprehensive coverage for solution files, vcxproj with platforms, and default configuration handling. (commit 668b7b9) |
This PR introduces a new
Enumeratorclass that provides a unified interface for enumerating both solution files and project files based on the requirements in issue #250648a5. The implementation extends beyond the existingSlnScannerfunctionality to support transparent enumeration of all MSBuild project types.Key Features
Unified Enumeration Interface
The new
Enumeratorclass provides two complementary methods for enumeration:EnumerateProjectPaths()- Returns project file paths:.sln,.slnx,.slnf(extracts all projects from solutions).csproj,.vbproj,.sqlproj,.fsproj,.vcxproj(direct enumeration)EnumerateProjCfg()- ReturnsProjCfgobjects with configuration details:SlnParser.ParseSolutionlogic for solution filesUsage is controlled by the new
EnumerationTypeenum:Performance Optimizations
Task.WhenAllfor improved performanceDirectory.EnumerateFileswith optimized enumeration optionsEnhanced Project Support
Extends beyond the current
SlnScannerto support:.sln,.slnx,.slnf.csproj,.vbproj,.sqlproj,.fsproj,.vcxprojImplementation Details
Core Components
Enumeratorclass inbld/Infrastructure/Enumerator.csEnumerationTypeenum added tobld/Models/DirectoryModels.csEnumeratorDemoServiceshowcasing usage patternsbld.Tests/EnumeratorTests.csIntegration Points
The new
Enumeratorcan be used as a drop-in replacement or complement toSlnScannerandSlnParserin existing services:CleaningApplicationNugetAnalysisApplicationTfmServiceOutdatedServiceBackward Compatibility
The implementation maintains full backward compatibility with existing code while providing enhanced functionality through the new enumeration interface.
Example Usage
This implementation addresses all requirements from the issue: transparent enumeration of solution and project files, support for all specified file formats, recursive project enumeration, configuration extraction, and performance optimization through parallelization.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.