-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Clean up extensions for dotnet CLI & Utils #47373
Conversation
…older. Moved other Extensions classes into the Extensions folder.
…ted Extensions namespace for all Extension classes.
var lastMatchingItemGroup = FindExistingUniformItemGroupWithCondition(root, projectItemElementType, framework); | ||
var lastMatchingItemGroup = root.FindExistingUniformItemGroupWithCondition(projectItemElementType, framework); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VS IDE did this automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR cleans up and normalizes the Extensions classes for the dotnet CLI and related projects by moving them into a dedicated Extensions folder and updating the relevant namespaces.
- Moved Extensions classes to an Extensions folder in the dotnet CLI project.
- Normalized namespaces across the Extensions classes and updated using directives in consuming files.
- Renamed CommonOptionsExtension to CommonOptionsExtensions to align with naming conventions.
Reviewed Changes
File | Description |
---|---|
src/Cli/Microsoft.DotNet.Cli.Utils/Extensions/CollectionsExtensions.cs | Updated namespace to Microsoft.DotNet.Cli.Utils.Extensions. |
src/Cli/Microsoft.DotNet.Cli.Utils/Extensions/LockFileExtensions.cs | Changed namespace and updated class access modifier to internal. |
src/Cli/Microsoft.DotNet.Cli.Utils/Extensions/ExceptionExtensions.cs | Updated namespace to Microsoft.DotNet.Cli.Utils.Extensions. |
src/Cli/Microsoft.DotNet.Cli.Utils/Extensions/ProcessStartInfoExtensions.cs | Updated namespace to Microsoft.DotNet.Cli.Utils.Extensions. |
src/Cli/Microsoft.DotNet.Cli.Utils/Extensions/AnsiExtensions.cs | Updated namespace to Microsoft.DotNet.Cli.Utils.Extensions. |
src/Cli/Microsoft.DotNet.Cli.Utils/Extensions/MSBuildProjectExtensions.cs | Updated namespace and modified an extension method call for clarity. |
src/Cli/Microsoft.DotNet.Cli.Utils/ForwardingAppImplementation.cs | Added using directive for the updated Extensions namespace. |
src/Cli/Microsoft.DotNet.Cli.Utils/Extensions/LockFileFormatExtensions.cs | Updated namespace to Microsoft.DotNet.Cli.Utils.Extensions. |
src/Cli/Microsoft.DotNet.Cli.Utils/GracefulException.cs | Added using directive for the updated Extensions namespace. |
src/Cli/Microsoft.DotNet.Cli.Utils/EnvironmentProvider.cs | Added using directive for the updated Extensions namespace. |
src/Cli/Microsoft.DotNet.Cli.Utils/Command.cs | Added using directive for the updated Extensions namespace. |
src/Cli/Microsoft.DotNet.Cli.Utils/Extensions/ProcessExtensions.cs | Updated namespace to Microsoft.DotNet.Cli.Utils.Extensions. |
src/Cli/Microsoft.DotNet.Configurer/CliFolderPathCalculator.cs | Updated using directive to the new Extensions namespace. |
src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs | Added using directive for the updated Extensions namespace. |
src/BuiltInTools/dotnet-watch/CommandLineOptions.cs | Updated using directive to reference Microsoft.DotNet.Cli.Extensions. |
src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/InstructionDisplayPostActionProcessor.cs | Added using directive for the updated Extensions namespace. |
src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.NoMatchHandling.cs | Added using directive for the updated Extensions namespace. |
src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.cs | Added using directive for the updated Extensions namespace. |
src/Cli/Microsoft.TemplateEngine.Cli/PostActionDispatcher.cs | Added using directive for the updated Extensions namespace. |
src/Cli/Microsoft.TemplateEngine.Cli/Commands/BaseCommand.cs | Added using directive for the updated Extensions namespace. |
Copilot reviewed 163 out of 163 changed files in this pull request and generated no comments.
return option.SetForwardingFunction((string o) => | ||
return option.SetForwardingFunction((o) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also automatic by VS IDE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mentioned offline the one pattern change that I don't like and would prefer reverting, but beyond that, this looks good 👍
# Conflicts: # src/Cli/dotnet/Extensions/OptionForwardingExtensions.cs
Summary
Simple PR. Does exactly these things for the
dotnet
andMicrosoft.DotNet.Cli.Utils
projects:s
to match the naming style convention.