<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: C# Argument Parser</title>
	<atom:link href="http://jake.ginnivan.net/2009/07/c-argument-parser/feed/" rel="self" type="application/rss+xml" />
	<link>http://jake.ginnivan.net/2009/07/c-argument-parser/</link>
	<description></description>
	<lastBuildDate>Fri, 22 Jan 2010 00:55:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ron Klein</title>
		<link>http://jake.ginnivan.net/2009/07/c-argument-parser/comment-page-1/#comment-227</link>
		<dc:creator>Ron Klein</dc:creator>
		<pubDate>Tue, 01 Dec 2009 10:31:10 +0000</pubDate>
		<guid isPermaLink="false">http://jake.ginnivan.net/2009/07/c-argument-parser/#comment-227</guid>
		<description>Thanks for your code. I highly suggest you add a download zip, since copy-pasting doesn&#039;t work (due to special characters like ` (single quote with direction) etc.)</description>
		<content:encoded><![CDATA[<p>Thanks for your code. I highly suggest you add a download zip, since copy-pasting doesn&#8217;t work (due to special characters like ` (single quote with direction) etc.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Ginnivan</title>
		<link>http://jake.ginnivan.net/2009/07/c-argument-parser/comment-page-1/#comment-97</link>
		<dc:creator>Jake Ginnivan</dc:creator>
		<pubDate>Wed, 23 Sep 2009 01:31:47 +0000</pubDate>
		<guid isPermaLink="false">http://jake.ginnivan.net/2009/07/c-argument-parser/#comment-97</guid>
		<description>Ah, that makes sense. Another possible solution would be to use the -url:http://localhost/test/myservice.svc format for the arguments. I have not tested though. I will be posting a follow up post with another argument library I found which is more strongly typed than this one. But this is great for flexible argument parsing. 

Will let you know if I sort it out.</description>
		<content:encoded><![CDATA[<p>Ah, that makes sense. Another possible solution would be to use the -url:http://localhost/test/myservice.svc format for the arguments. I have not tested though. I will be posting a follow up post with another argument library I found which is more strongly typed than this one. But this is great for flexible argument parsing. </p>
<p>Will let you know if I sort it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd</title>
		<link>http://jake.ginnivan.net/2009/07/c-argument-parser/comment-page-1/#comment-95</link>
		<dc:creator>Todd</dc:creator>
		<pubDate>Tue, 22 Sep 2009 22:42:23 +0000</pubDate>
		<guid isPermaLink="false">http://jake.ginnivan.net/2009/07/c-argument-parser/#comment-95</guid>
		<description>Actually - amend that. URL formatted inputs are broken with the original RegEx, but not due to the &quot;/&quot;. Rather, it&#039;s due to the &quot;:&quot; in the URL. The following RegEx should solve the problem:

@&quot;^-{1,2}&#124;^/&#124;=&quot;

-Todd</description>
		<content:encoded><![CDATA[<p>Actually &#8211; amend that. URL formatted inputs are broken with the original RegEx, but not due to the &#8220;/&#8221;. Rather, it&#8217;s due to the &#8220;:&#8221; in the URL. The following RegEx should solve the problem:</p>
<p>@&#8221;^-{1,2}|^/|=&#8221;</p>
<p>-Todd</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd</title>
		<link>http://jake.ginnivan.net/2009/07/c-argument-parser/comment-page-1/#comment-94</link>
		<dc:creator>Todd</dc:creator>
		<pubDate>Tue, 22 Sep 2009 22:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://jake.ginnivan.net/2009/07/c-argument-parser/#comment-94</guid>
		<description>Great piece of code. Thanks for sharing.

One thing I stumbled upon, though, is that this code chokes on command line inputs that have URL formatting. For instance, if you want to pass in the address of a web service via the command line (let&#039;s say, http://localhost/test/myservice.svc), the &quot;/&quot; get interpreted as split characters.

The easy work around is to remove the &quot;/&quot; character as a parameter option in the RegEx:

var argumentSplitter = new Regex(@&quot;^-{1,2}&#124;=&#124;:&quot;,...

There are more complex workarounds that could be done to enable &quot;/&quot; parameters -and- URL format input, but each approach has special considerations.

Hope this &quot;nuance&quot; helps others that may run in to this case.

-Todd</description>
		<content:encoded><![CDATA[<p>Great piece of code. Thanks for sharing.</p>
<p>One thing I stumbled upon, though, is that this code chokes on command line inputs that have URL formatting. For instance, if you want to pass in the address of a web service via the command line (let&#8217;s say, <a href="http://localhost/test/myservice.svc)" rel="nofollow">http://localhost/test/myservice.svc)</a>, the &#8220;/&#8221; get interpreted as split characters.</p>
<p>The easy work around is to remove the &#8220;/&#8221; character as a parameter option in the RegEx:</p>
<p>var argumentSplitter = new Regex(@&#8221;^-{1,2}|=|:&#8221;,&#8230;</p>
<p>There are more complex workarounds that could be done to enable &#8220;/&#8221; parameters -and- URL format input, but each approach has special considerations.</p>
<p>Hope this &#8220;nuance&#8221; helps others that may run in to this case.</p>
<p>-Todd</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andre</title>
		<link>http://jake.ginnivan.net/2009/07/c-argument-parser/comment-page-1/#comment-36</link>
		<dc:creator>Andre</dc:creator>
		<pubDate>Sun, 16 Aug 2009 09:05:35 +0000</pubDate>
		<guid isPermaLink="false">http://jake.ginnivan.net/2009/07/c-argument-parser/#comment-36</guid>
		<description>Jake,

that helps at all and works fine.
For sure to use a space would be fine but it was more importent to make it work.

Thanks for your support.
Cheers</description>
		<content:encoded><![CDATA[<p>Jake,</p>
<p>that helps at all and works fine.<br />
For sure to use a space would be fine but it was more importent to make it work.</p>
<p>Thanks for your support.<br />
Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Ginnivan</title>
		<link>http://jake.ginnivan.net/2009/07/c-argument-parser/comment-page-1/#comment-34</link>
		<dc:creator>Jake Ginnivan</dc:creator>
		<pubDate>Sun, 16 Aug 2009 07:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://jake.ginnivan.net/2009/07/c-argument-parser/#comment-34</guid>
		<description>Hey Andre,

Thanks for that, looks like there is a error with spaces, ie first example.

The second issue is that IsTrue only checks to see if a flag is declared. So CommandLine.IsTrue(&quot;u&quot;) would return true. 
Use if (CommandLine.Exists(&quot;mdb&quot;)) or if (CommandLine.Single(&quot;mdb&quot;) != null)

Hope this helps, will write some tests to get the first example with &#039;-arg value&#039; working. Cheers</description>
		<content:encoded><![CDATA[<p>Hey Andre,</p>
<p>Thanks for that, looks like there is a error with spaces, ie first example.</p>
<p>The second issue is that IsTrue only checks to see if a flag is declared. So CommandLine.IsTrue(&#8220;u&#8221;) would return true.<br />
Use if (CommandLine.Exists(&#8220;mdb&#8221;)) or if (CommandLine.Single(&#8220;mdb&#8221;) != null)</p>
<p>Hope this helps, will write some tests to get the first example with &#8216;-arg value&#8217; working. Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NL</title>
		<link>http://jake.ginnivan.net/2009/07/c-argument-parser/comment-page-1/#comment-33</link>
		<dc:creator>NL</dc:creator>
		<pubDate>Sat, 15 Aug 2009 16:28:01 +0000</pubDate>
		<guid isPermaLink="false">http://jake.ginnivan.net/2009/07/c-argument-parser/#comment-33</guid>
		<description>...and where are my manners!?  Thanks for making the code available Jake!</description>
		<content:encoded><![CDATA[<p>&#8230;and where are my manners!?  Thanks for making the code available Jake!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andre</title>
		<link>http://jake.ginnivan.net/2009/07/c-argument-parser/comment-page-1/#comment-32</link>
		<dc:creator>Andre</dc:creator>
		<pubDate>Sat, 15 Aug 2009 11:48:05 +0000</pubDate>
		<guid isPermaLink="false">http://jake.ginnivan.net/2009/07/c-argument-parser/#comment-32</guid>
		<description>Nice code but I can&#039;t make it work ...
Here the args I us:
-u -d -mdb &quot;c:\entries.mdb&quot; -xml &quot;j:\&quot;
In this way the result is:
Arguments CommandLine = new Arguments(args);
if (CommandLine.IsTrue(&quot;mdb&quot;)) mdb = CommandLine.Single(&quot;mdb&quot;); // mdb is true, Single return null

-u -d -mdb=&quot;c:\entries.mdb&quot; -xml=&quot;j:\&quot;
In this way the result is:
Arguments CommandLine = new Arguments(args);
if (CommandLine.IsTrue(&quot;mdb&quot;)) mdb = CommandLine.Single(&quot;mdb&quot;); // mdb is false

Do I missunderstood the usage of?

Thanks,

Andre</description>
		<content:encoded><![CDATA[<p>Nice code but I can&#8217;t make it work &#8230;<br />
Here the args I us:<br />
-u -d -mdb &#8220;c:\entries.mdb&#8221; -xml &#8220;j:\&#8221;<br />
In this way the result is:<br />
Arguments CommandLine = new Arguments(args);<br />
if (CommandLine.IsTrue(&#8220;mdb&#8221;)) mdb = CommandLine.Single(&#8220;mdb&#8221;); // mdb is true, Single return null</p>
<p>-u -d -mdb=&#8221;c:\entries.mdb&#8221; -xml=&#8221;j:\&#8221;<br />
In this way the result is:<br />
Arguments CommandLine = new Arguments(args);<br />
if (CommandLine.IsTrue(&#8220;mdb&#8221;)) mdb = CommandLine.Single(&#8220;mdb&#8221;); // mdb is false</p>
<p>Do I missunderstood the usage of?</p>
<p>Thanks,</p>
<p>Andre</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Ginnivan</title>
		<link>http://jake.ginnivan.net/2009/07/c-argument-parser/comment-page-1/#comment-30</link>
		<dc:creator>Jake Ginnivan</dc:creator>
		<pubDate>Sat, 15 Aug 2009 03:19:08 +0000</pubDate>
		<guid isPermaLink="false">http://jake.ginnivan.net/2009/07/c-argument-parser/#comment-30</guid>
		<description>Thanks for the feedback, will find a new formatting widget and add in the using statements.

Cheers,
Jake</description>
		<content:encoded><![CDATA[<p>Thanks for the feedback, will find a new formatting widget and add in the using statements.</p>
<p>Cheers,<br />
Jake</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NL</title>
		<link>http://jake.ginnivan.net/2009/07/c-argument-parser/comment-page-1/#comment-29</link>
		<dc:creator>NL</dc:creator>
		<pubDate>Sat, 15 Aug 2009 00:54:58 +0000</pubDate>
		<guid isPermaLink="false">http://jake.ginnivan.net/2009/07/c-argument-parser/#comment-29</guid>
		<description>The text formatting widget you use above really mangled the code.  The quotes all had to be replaced and a couple &lt; + &gt; as well.  

Additionally I had to use the following &#039;using&#039; statements:

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions</description>
		<content:encoded><![CDATA[<p>The text formatting widget you use above really mangled the code.  The quotes all had to be replaced and a couple &lt; + &gt; as well.  </p>
<p>Additionally I had to use the following &#8216;using&#8217; statements:</p>
<p>using System;<br />
using System.Collections;<br />
using System.Collections.Generic;<br />
using System.Collections.ObjectModel;<br />
using System.Linq;<br />
using System.Text;<br />
using System.Text.RegularExpressions</p>
]]></content:encoded>
	</item>
</channel>
</rss>
