I have two .NET managed assemblies. The first one is main application, and the one is an independent tool.
Now what I have to do is integrate the small tool with main application. So when user click on a button from main application the “User defined object” need to be passed to another small tool which will run into another different independent process.
But we can send only a single string argument only to a process.
What can be best approach to do this? What I need to send to another process is list of files with the settings for each file. Here setting is my “User defined object”.
I have another twist to this.
First time if you process is not running I will send parameter to it and run the process.
But if process is running, can I send parameter to it and append the data to existing one without restarting it again from scratch.
Any help regarding that. How this can be done.
Thanks
I found two good solutions to the above question.
1) Construct a datatable with all given input as column and write that as xml. And start a process with that file as input and read that xml file into the invoked process.
In this solution, I have no control over my new process and I can’t even debug it. I found lot of complexity while doing this.
2) So found this solution, add the exe as a reference to solution and simply invoke it with file as input as simple call to an assembly. Now have total control on it. I can even do exception handling.
Thanks everyone for reply.