Skip to content
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

Expose ToolTask exit, stdout, and stderr handlers #10148

Merged
merged 2 commits into from
May 17, 2024

Conversation

ladipro
Copy link
Member

@ladipro ladipro commented May 17, 2024

Context

The StartToolProcess method added in #9649 does not allow subclasses to create and return equivalent processes because it does not have access to the exit, stdout, and stderr event handlers subscribed in the incoming Process object. In C# it is not possible to get the invocation list of an event outside of its declaring class.

Changes Made

Made ReceiveExitNotification, ReceiveStandardErrorData, and ReceiveStandardOutputData protected to expose them to subclasses.

Testing

A new unit test exercising the scenario.

@ladipro ladipro merged commit 4db378c into dotnet:main May 17, 2024
10 checks passed
@ladipro ladipro deleted the expose-process-handlers branch May 17, 2024 21:17
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.

None yet

5 participants