Write an automation interface for LINQPad
-
Charles Burns commented
The linked forum post no longer exists. It seems like this should be closed.
-
Michel Bretschneider commented
Why not use Util.Run from your code, or LPRun from ccommand line? This post is quite old and since there weren't any recent updates and we now have lprun it could be closed. Correct me if I'm wrong.
-
Alan Hemmings commented
Hi Joe, just read your notes on oreilly, where you ask about output: I'd love for the QueryResult to support something like automapper and automatically MAP the results from the script to my <T> results, for example, perhaps with a:
public class Top { public double TopX { get; set; } public double TopY { get; set; }}
List<Top> stats = Query.Run("myquery.linq");
or
var stats = Query.Run<List<Top>>("myquery.linq");Having the standard error and console still be supported, would allow me to continue to use the approval's library we use for our build steps ( http://approvaltests.sourceforge.net/ ) to (approve) that the build step ran correctly, and then pipe the strongly typed output of that step to the next build step without having to "parse" text or html.
-
Alan Hemmings commented
re: MikeS -> Oh my gosh, "compile to exe and install as service"
that is such an awesome idea! (I second that idea)
(I spent some time yesterday having coffee with a dev friend, he was showing me Scala samples, I was showing him writing the same Scala code in C# with same terseness, from within LinqPad. sweetness ;-D Thanks Joe! My top 3 dev tools, Linqpad, Visual studio, Resharper... in that order. I love the fact that if I'm really pressed for time, have a clean server with no toolage, I can install Linqpad within seconds, and get on with being productive. -
mcintyre321 commented
Has there been any progress on this?
-
MikeS commented
Voting for: Run script from command line, Compile to exe/dll from command line.
Now with the async stuff coming in I can picture LP being a kind of a node.js IDE except in C#.NET and I envision a toolbar button that says "compile to exe and install as service".
-
Lasse Vågsæther Karlsen commented
I would also love to have this, but I would like to have it separate the act of compiling the script from the act of running it. I use LINQPad scripts in my open source class libraries and I would love to have my continous integration server verify that all of the examples still compile. Basically, I would like a command line option that says "compile-only", it wouldn't need to save the assembly, just compile it to verify that all the code is legal.
-
Adam Ralph commented
+3 yes please! this would allow us to use C# as a general scripting language in many scenarios
-
mcintyre321 commented
Hi I've created a tool that can run basic LINQPad scripts which might help you out until this work item is completed. Get it from https://github.com/mcintyre321/LINQPadRunner
-
awag commented
I agree with tjbarbour - command line runner would be a great start
-
tjbarbour commented
I say 1st version just allow command line running of .linq files and either dump the output out or take another parameter where to save it. Later versions / iterations can provide more sophisticated piping / API access.
Thanx! -
andremoraes commented
It'll be really nice to accept cmd line and automation as com object so we can use also in simple VBS scripts