simple IPC mechanism for C#/WPF application to implement app CLI

て烟熏妆下的殇ゞ 提交于 2019-12-06 12:05:23

问题


So I've been reading lots about interprocess communication on .Net. Named pipes, remoting. It all seems great but possibly overkill for what I need to do.

I want to add a command line interface to my WPF application, so I need a simple IPC mechanism to send the string from one process to the already running app.

What does SO recommend for doing so?


回答1:


NamedPipeClientStream and NamedPipeServerStream are pretty simple. Here's a pretty simple example where IPC is used to pass command line arguments from one instance of an application to another. It's not exactly what you want to do, but pretty close.



来源:https://stackoverflow.com/questions/953853/simple-ipc-mechanism-for-c-wpf-application-to-implement-app-cli

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!