RFE: support 'mixin' scripts?

The plugins directory and My Extensions are great mechanisms to support adding code that will affect all queries, and they're awesome.

However, I keep running across the need to have a set of scripts (say, 10 to 20) that all need some shared functionality that I need to write (not something available from an existing NuGet package). However, putting this functionality into My Extensions could be problematic, either because it brings in additional dependencies that you don't want to introduce across all scripts (certain NuGet packages, for instance) or because you're just trying to keep your My Extensions from becoming any bigger than it already is. :)

Currently the closest I can get (AFAICT) is to create a new C# class library then F4 and reference the output dll from the script, then use it like any other assembly. That's not horrible, but it means having to switch to VS and building something there.

I can use Util to compile/run other scripts, but that only supports returning a single value instead of letting me 'mix in' additional functionality (let me use the methods defined in that script, for instance).

Since it seems like LINQPad is already doing partial classes (or similar) for the UserQuery class, it seemed like being able to 'mix in' other scripts (perhaps in the same F4 dialog as dll/nuget references exist now?) might be doable.

Probably more trouble than it's worth since there are definitely workarounds, but with v5 in the works, figured I might as well ask. :)


Sign In or Register to comment.