tsunami
log in
email
password
links
newest items
tag list
syntax reference
tag:time
history
item name
tags
==Links - "official documentation"[1] - "Command Line Processing with Mono.GetOptions"[2] [1]http://www.go-mono.com/docs/index.aspx?link=N%3AMono.GetOptions [2]http://www.talios.com/command_line_processing_with_monogetoptions.htm ==Download I have found no way to download the `Mono.GetOptions.dll` directly; you will get the dll by "downloading Mono"[1] (choose "Mono 2.0 Setup"). You may find the dll in `C:\Program Files\Mono-2.0\lib\mono\2.0\\` -- if you do not, simply search for it. [1]http://www.go-mono.com/mono-downloads/download.html ==Sample code ("full version"[1]) [1]ThreadedSqlExecutor {{ using System; using System.Collections.Generic; using System.Linq; using System.Text; using Mono.GetOptions; using System.IO; namespace ThreadedSqlExecutor { class Program { class Opts : Options { [Option("input file", 'f')] public string FileName { get; protected set; } [Option("max threads", 't')] public int MaxThreads { get; protected set; } [Option("minimum period in ms", 'p')] public int MinimumPeriod { get; protected set; } [Option("connection string", 'c')] public string ConnectionString { get; protected set; } [Option("staggered start", "staggered")] public bool StaggeredStart { get; protected set; } } static void Main(string[] args) { Opts opts = new Opts(); opts.ProcessArgs(args); Action<string> errorAndExit = msg => { Console.Error.WriteLine(msg); Environment.Exit(-1); }; if (!File.Exists(opts.FileName)) errorAndExit("valid file not specified"); }} ==Sample invocations {{ ThreadedSqlExecutor c:\input.txt 3 9 "connection string with spaces" -staggered ThreadedSqlExecutor -f c:\input.txt -t 3 -p 9 -c "connection string with spaces" -staggered }} ==Notes [[ilmerge]] can be used to combine the `GetOptions` _dll_ with the _exe_.
some permissive license goes here
contact