Please Share Your Thoughts on Util.Clipboard
I was writing some plain text out from a query this morning - only to then open that file and copy the text out and paste it to another application. This started me thinking that I would like to be able to skip the step of saving it to a file and just send it directly to the clipboard.
What do people think about extending the global Util object with clipboard access? It certainly isn't a big deal to bring the Forms or WPF libraries into your query to get access to their Clipboard classes, but I do think it would be nice to have LINQPad provide a wrapper around those classes to simplify things. This would be more about setting the clipboard data, though I suppose while there are fewer cases, there are still use cases for reading it too.
Any thoughts on what it should look like? Here are some ideas I had:
Clipboard reference: https://msdn.microsoft.com/en-us/library/system.windows.clipboard.aspx
I thought I would put together some ideas in an extension and share the source. Is there interest?
What do people think about extending the global Util object with clipboard access? It certainly isn't a big deal to bring the Forms or WPF libraries into your query to get access to their Clipboard classes, but I do think it would be nice to have LINQPad provide a wrapper around those classes to simplify things. This would be more about setting the clipboard data, though I suppose while there are fewer cases, there are still use cases for reading it too.
Any thoughts on what it should look like? Here are some ideas I had:
- Util.SetClipboard(string text)
- Util.Clipboard.SetData(string format, object data)
Clipboard reference: https://msdn.microsoft.com/en-us/library/system.windows.clipboard.aspx
I thought I would put together some ideas in an extension and share the source. Is there interest?