LINQPad "Dump server"
Hi!
The "How LINQPad Works" page describes that LINQPad has a client/server model. Is it possible that any external code can directly "Dump" to LINQPad without relying on the built-in query editor?
For example, a console program (acting as the "client") that dump objects directly into a running LINQPad instance (acting as a "server"). The closest thing I can find is probably https://github.com/codingadventures/LINQBridgeVs, but it only works as a visualizer for Visual Studio debugger.
Thanks!
Comments
Can you elaborate on what you'd like to achieve?
Oh sure, something like this:
Basically:
1. One .NET process calls
.Dump()
on any object2. The object get transported to a running LINQPad process
3. LINQPad visualize the received object on the Result tab
I see. This is not possible with the host LINQPad process - you have to write the UI yourself by creating a WPF app with an embedded web browser (such as WebView2). You could then call LINQPad's Util.Run to execute queries to HTML which you display in the browser.
Oh, thanks!
Joe is correct insofar that if you want to Dump directly to a results window that automatically appears from the executing process.
However you can Dump from one process to a running instance of LP on the same machine. (I think I've even dumped across TCP before but would have to search for it..)
I frequently have Visual Studio and LP open at the same time. When I'm developing in VS and need to see something better than what the output window, or debugger watch windows provide, I just IPC it to LP and get the same great formatted Dump experience.
In LP I run a 5 line IPC server, and in VS I consume a small nuget package to allow the Dumping.
Is this what you were thinking ?