Here’s a neat little Friday experiment I’ve been looking at. New-UDCSharpEndpoint would take in C# code, compile it with Rosyln and then behave like other UDEndpoints. It’s much faster because it is acutal compiled .NET code.
The difference would be no access to cmdlets but if done correctly you should be able to access variables, return JSON, call websockets (the stuff that runs things like Show-UDModal). It should even be possible to create controls since PowerShell just returns hashtables. It’s a lot of work to get that far but having simple C# endpoints might be handy for those high-performance endpoint requirements.
@Speegel - This isn’t in the nightly yet (in a different branch) but I could sneak it in for you guys to play with. It doesn’t support passing in variables or anything but you will be able to run C# and return JSON via the endpoints.
It seemed like an edge-case that wasn’t worth the implementation. There wasn’t much of a blocker here but seemed to deviate from the core functionality of UD as primarily a PowerShell solution and that made me decide not to pursue it. I’ll open-source the prototype when I have time so that others can futz with it if they like.