2003-01-12 Nick Drochak <ndrochak@gol.com>
[mono.git] / mcs / nunit20 / util / GuiOptions.cs
1 namespace NUnit.Util
2 {
3         using System;
4         using Codeblast;
5
6         public class GuiOptions : CommandLineOptions
7         {
8                 private bool isInvalid = false; 
9
10                 [Option(Short="?", Description = "Display help")]
11                 public bool help = false;
12
13                 public GuiOptions(String[] args) : base(args) 
14                 {}
15
16                 protected override void InvalidOption(string name)
17                 { isInvalid = true; }
18
19                 public string Assembly
20                 {
21                         get 
22                         {
23                                 return (string)Parameters[0];
24                         }
25                 }
26
27                 public bool IsAssembly
28                 {
29                         get 
30                         {
31                                 return ParameterCount == 1;
32                         }
33                 }
34
35                 public bool Validate()
36                 {
37                         return (NoArgs || ParameterCount == 1) && !isInvalid;
38                 }
39         }
40 }