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

Add ability to specify launched process filename and args #13

Closed
wants to merge 1 commit into from

Conversation

xavierzwirtz
Copy link
Contributor

This PR adds the ability to specify the invoked process file name and arguments. I added this due to needing control over the invoked process being 32bit or 64bit, and also easy support for .net framework. Somewhat resolves #11 as well, simply create a .net framework console app that calls Tmds.Utils.ExecFunction.Program.Main(args) immediately.

private static Lazy<ExecFunctionHostArgs> _execFunctiohHostArgsDefault =
new Lazy<ExecFunctionHostArgs>(() => new ExecFunctionHostArgs(typeof(ExecFunction).Assembly.Location));

public class ExecFunctionHostArgs
Copy link
Owner

Choose a reason for hiding this comment

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

Can you remove class ExecFunctionHostArgs, and add HostFilename/HostArguments to class ExecFunctionOptions and use that in ConfigureProcessStartInfoForMethodInvocation.

nit: for consistency with ProcessStartInfo, use HostFileName (capital N).

@tmds
Copy link
Owner

tmds commented Aug 19, 2021

@xavierzwirtz sorry this took so long. If you're still interested in contributing this, I've left a comment.

@xavierzwirtz
Copy link
Contributor Author

I can make the style change above. I have actually done further work on this that is not pushed. Would you have a problem with also exposing the Process object to the end user? I needed to add a handler to OutputDataReceived before the process was started.

@tmds
Copy link
Owner

tmds commented Aug 23, 2021

I can make the style change above. I have actually done further work on this that is not pushed. Would you have a problem with also exposing the Process object to the end user? I needed to add a handler to OutputDataReceived before the process was started.

There should be no need do to this before the process is started. The reading starts when BeginOutputReadLine is called. So you should be able to add this event on the Process returned by the Start method. Right?

@tmds
Copy link
Owner

tmds commented Jul 1, 2022

Closing due to inactivity.

@tmds tmds closed this Jul 1, 2022
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.

Consider adding .NET Framework support
2 participants