Easy-peasy C# based scripting environment for your everyday tasks
How do I use HiveSharp?
Emm... However you want. Duh.
On a serious note, you need to write a script frist to be able to execute it - or have a look at the sample scripts included with the installation. You'll typically find them under "C:\Program Files (x86)\HiveSharp\SampleScripts".
HiveSharp scripts are referred to as modules to emphasize the fact that they contain executable functions as opposed to being executable in a self-sufficient way like shell scripts are. Each HiveSharp module constitutes a valid C# source file. A bare-bones module will consist of little more than a public static class with a public static method in it. Let's have a look at one of the samples, "RawSampleScript.cs":
This module exposes a class with one method, MyMethod1, executable with one or two arguments. As it stands, no extra metadata is available to HiveSharp when inspecting this module. While it's possible for HiveSharp to execute MyMethod1, it can't infer any information as to what it does or what its parameters mean. Only you can do it by inspecting the source code, which is not ideal. Let's fix it. Cue "RawSampleScript.cs":
With this extra information at hand, HiveSharp can display user-friendly descriptions of classes, methods and their parameters, as well as apply constraints to arguments with which methods are being executed.
Experiment with scripting for HiveSharp and you'll see why we think it's so handy. Good luck and have fun!