I made a library that makes it easy to enable your static functions to be called through CLI https://github.com/AlexanderBrevig/LazyCLI

Easily install with NuGet using Package Manager Console:

PM> Install-Package LazyCLI

Give this class:

namespace CLI
    public static class Hello
        public static void World(string msg)
            Console.WriteLine("Hello World: " + msg);

You can call the World method using:

LazyCLI.CLI.HandleArgs(new string[] { "CLI", "Hello", "World", "This is pretty handy" });

Will print:

Hello World: This is pretty handy
blog comments powered by Disqus


22 October 2012