Hierarchical 'My Extensions' possible?
So my long-term hope is getting #include/#load support like scriptcs/roslyn has per http://forum.linqpad.net/discussion/826/rfe-support-mixin-scripts
Barring that, since the problem I have with the current options is that it leaves me dumping everything into the single 'My Extensions', as a form of isolation, could linqpad support a hierarchical approach?
So instead of just the 'base' My Extensions being included in a given query, it would include all the ones from the directory the script is in all the way up to the root/base one.
This would allow me to have a mechanism to share code among a set of scripts (like the JSON POCO definitions from the original use case) without having to share it among the entire tree of scripts.
Since 'My Extensions' doesn't exist in the queries tree as-is I'm not sure how viable this is, and the #include/#load feature might be less trouble than this (not sure on the relative impl cost), but maybe a convention where files named _include.cs in the parent hierarchy are included?
Just trying to think of a possible workaround with less complexity until #include/#load support can be added.
Thanks!
Barring that, since the problem I have with the current options is that it leaves me dumping everything into the single 'My Extensions', as a form of isolation, could linqpad support a hierarchical approach?
So instead of just the 'base' My Extensions being included in a given query, it would include all the ones from the directory the script is in all the way up to the root/base one.
This would allow me to have a mechanism to share code among a set of scripts (like the JSON POCO definitions from the original use case) without having to share it among the entire tree of scripts.
Since 'My Extensions' doesn't exist in the queries tree as-is I'm not sure how viable this is, and the #include/#load feature might be less trouble than this (not sure on the relative impl cost), but maybe a convention where files named _include.cs in the parent hierarchy are included?
Just trying to think of a possible workaround with less complexity until #include/#load support can be added.
Thanks!
Comments
You can execute scripts by dragging and dropping them on LINQPad.exe in the corresponding folder.
Limitation: it's not possible to run LINQPad.exe more than once (found no option to allow mutiple instances).
In addition to above, this workaround does not support hierarchical My Extensions, just separate My Extensions per project / folder.