Skip to content

Commit

Permalink
Add list example to documentation pending a full supported types section
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-Lucas committed Jan 5, 2017
1 parent 1fbe2fa commit 0124eb3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
10 changes: 9 additions & 1 deletion website/Body.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;

using EntryPoint;
using System.Collections.Generic;

namespace Website {
class Body {
Expand Down Expand Up @@ -152,14 +153,21 @@ public MessagingCliArguments() : base("Message Sender") { }
[Help("Mandatory Subject to provide")]
public string Subject { get; set; }

// An importance level for the message.
// An enum importance level for the message.
// If not provided this is defaulted to `Normal`
// User can provide the value as a number or string (ie. '2' or 'high')
[OptionParameter(LongName = "importance",
ShortName = 'i')]
[Help("Sets the importance level of a sent message")]
public MessageImportanceEnum Importance { get; set; } = MessageImportanceEnum.Normal;

// A list of strings
// Lists support all the same types as any other option parameter
// The Cli expects list values in the form `item1,item2,item3` etc
[OptionParameter(LongName = "recipients")]
[Help("A list of email addresses to send to")]
public List<string> Recipients { get; set; }

// A message *must* be provided as the first operand
[Required]
[Operand(1)]
Expand Down
15 changes: 11 additions & 4 deletions website/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/png" href="favicon.ico">

<title>EntryPoint 0.9.6</title>
<title>EntryPoint 0.9.7</title>

<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/androidstudio.min.css" rel="stylesheet" />
Expand Down Expand Up @@ -66,7 +66,7 @@
<div class="starter-template">
<h1 class="hero-title">
<i class="fa fa-terminal"></i>
EntryPoint 0.9.6
EntryPoint 0.9.7
</h1>
<p class="lead">
Composable CLI Argument Parser
Expand Down Expand Up @@ -222,14 +222,21 @@ <h3>Example Application</h3>
[Help(&quot;Mandatory Subject to provide&quot;)]
public string Subject { get; set; }

// An importance level for the message.
// An enum importance level for the message.
// If not provided this is defaulted to `Normal`
// User can provide the value as a number or string (ie. '2' or 'high')
[OptionParameter(LongName = &quot;importance&quot;,
ShortName = 'i')]
[Help(&quot;Sets the importance level of a sent message&quot;)]
public MessageImportanceEnum Importance { get; set; } = MessageImportanceEnum.Normal;

// A list of strings
// Lists support all the same types as any other option parameter
// The Cli expects list values in the form `item1,item2,item3` etc
[OptionParameter(LongName = &quot;recipients&quot;)]
[Help(&quot;A list of email addresses to send to&quot;)]
public List&lt;string&gt; Recipients { get; set; }

// A message *must* be provided as the first operand
[Required]
[Operand(1)]
Expand Down Expand Up @@ -437,7 +444,7 @@ <h2 id="tips-amp-behaviour">Tips &amp; Behaviour</h2>
<hr />
<b>EntryPoint</b> is released under the <a href="https://raw.githubusercontent.com/Nick-Lucas/EntryPoint/master/LICENSE.txt">MIT license</a>
<br />
Updated on Jan 1, 2017
Updated on Jan 5, 2017
<br /><br />
</div>

Expand Down

0 comments on commit 0124eb3

Please sign in to comment.