Permalink
Browse files

Convert Unshelve to NDesk.Options.

  • Loading branch information...
1 parent d958d4f commit d20938c45fc394b195ec1305c3c1614bc39eb037 @spraints spraints committed Jan 31, 2012
Showing with 12 additions and 10 deletions.
  1. +12 −10 GitTfs/Commands/Unshelve.cs
@@ -6,9 +6,9 @@
using System.Linq;
using System.Text.RegularExpressions;
using NDesk.Options;
-using CommandLine.OptParse;
-using Sep.Git.Tfs.Core;
using StructureMap;
+using Sep.Git.Tfs.Core;
+
namespace Sep.Git.Tfs.Commands
{
[Pluggable("unshelve")]
@@ -23,19 +23,21 @@ public Unshelve(Globals globals)
_globals = globals;
}
- [OptDef(OptValType.ValueReq)]
- [ShortOptionName('u')]
- [LongOptionName("user")]
- [UseNameAsLongOption(false)]
- [Description("Shelveset owner ('all' means all users)")]
- public string Owner { get; set; }
+ private string Owner { get; set; }
public OptionSet OptionSet
{
- get { return new OptionSet(); }
+ get
+ {
+ return new OptionSet
+ {
+ { "u|user=", "Shelveset owner (default: current user)\nUse 'all' to search all shelvesets.",
+ v => Owner = v },
+ };
+ }
}
- public IEnumerable<IOptionResults> ExtraOptions
+ IEnumerable<CommandLine.OptParse.IOptionResults> GitTfsCommand.ExtraOptions
{
get { return this.MakeNestedOptionResults(); }
}

0 comments on commit d20938c

Please sign in to comment.