Skip to content

Cleanup PipeNameDescription #49756

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

Merged
merged 1 commit into from
Jul 16, 2025
Merged

Cleanup PipeNameDescription #49756

merged 1 commit into from
Jul 16, 2025

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Jul 13, 2025

This class is sealed and the current dispose implementation is unnecessarily complicated. The Dispose(bool) method is only relevant in non-sealed classes.

Corresponding testfx PR was merged as well: microsoft/testfx#6000

@Copilot Copilot AI review requested due to automatic review settings July 13, 2025 11:21
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR simplifies the disposal pattern in the sealed PipeNameDescription class by removing the unused Dispose(bool) overload and streamlining the Dispose() method.

  • Removed the redundant Dispose(bool disposing) overload and its call from Dispose().
  • Simplified Dispose() to only check the disposal flag and handle the directory cleanup logic.
Comments suppressed due to low confidence (1)

src/Cli/dotnet/Commands/Test/IPC/PipeNameDescription.cs:15

  • The Dispose method no longer sets the _disposed flag, so repeated calls will re-run the disposal logic. Add _disposed = true; after the cleanup to prevent multiple disposals.
    public void Dispose()

@Youssef1313 Youssef1313 enabled auto-merge (squash) July 14, 2025 07:37
@Youssef1313
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants