I suggest you ...

335 votes
Sign in
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Password icon
Signed in as (Sign out)
  • Michel Bretschneider commented  ·   ·  Flag as inappropriate

    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  ·   ·  Flag as inappropriate

    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");
    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  ·   ·  Flag as inappropriate

    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.

  • MikeS commented  ·   ·  Flag as inappropriate

    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  ·   ·  Flag as inappropriate

    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  ·   ·  Flag as inappropriate

    +3 yes please! this would allow us to use C# as a general scripting language in many scenarios

  • awag commented  ·   ·  Flag as inappropriate

    I agree with tjbarbour - command line runner would be a great start

  • tjbarbour commented  ·   ·  Flag as inappropriate

    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.

  • andremoraes commented  ·   ·  Flag as inappropriate

    It'll be really nice to accept cmd line and automation as com object so we can use also in simple VBS scripts

Feedback and Knowledge Base