~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to samples/Gallio/Gallio.SharpDevelop/TestRunnerExtensionCommandLineArgument.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// <file>
 
2
//     <copyright see="prj:///doc/copyright.txt"/>
 
3
//     <license see="prj:///doc/license.txt"/>
 
4
//     <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
 
5
//     <version>$Revision$</version>
 
6
// </file>
 
7
 
 
8
using System;
 
9
 
 
10
namespace Gallio.SharpDevelop
 
11
{
 
12
        public class TestRunnerExtensionCommandLineArgument
 
13
        {
 
14
                string type;
 
15
                string parameters = String.Empty;
 
16
                
 
17
                public TestRunnerExtensionCommandLineArgument(string type)
 
18
                {
 
19
                        this.type = type;
 
20
                }
 
21
                
 
22
                public string Type {
 
23
                        get { return type; }
 
24
                }
 
25
                
 
26
                public string Parameters {
 
27
                        get { return parameters; }
 
28
                        set { parameters = value; }
 
29
                }
 
30
                
 
31
                public override string ToString()
 
32
                {
 
33
                        return String.Format("/re:\"{0}{1}\"",
 
34
                                GetTypeName(),
 
35
                                GetParameters());
 
36
                }
 
37
                
 
38
                string GetTypeName()
 
39
                {
 
40
                        return type;
 
41
                }
 
42
                
 
43
                string GetParameters()
 
44
                {
 
45
                        if (String.IsNullOrEmpty(parameters)) {
 
46
                                return String.Empty;
 
47
                        }
 
48
                        return String.Format(";{0}", parameters);
 
49
                }
 
50
        }
 
51
}