BadScript 2
Loading...
Searching...
No Matches
Custom_Struct.cs
Go to the documentation of this file.
1
// Copyright 2005-2015 Giacomo Stelluti Scala & Contributors. All rights reserved. See License.md in the project root for license information.
2
3
using
System;
4
5
namespace
CommandLine.Tests.Fakes
6
{
7
public
class
CustomStructOptions
8
{
9
[Option(
'c'
,
"custom"
, HelpText =
"Custom Type"
)]
10
public
CustomStruct
Custom
{
get
;
set
; }
11
}
12
13
public
struct
CustomStruct
14
{
15
public
string
Input
{
get
;
set
; }
16
public
string
Server
{
get
;
set
; }
17
public
int
Port
{
get
;
set
; }
18
public
CustomStruct
(
string
url)
19
{
20
Input
= url;
21
Server
=
""
;
22
Port
= 80;
23
var data = url.Split(
':'
);
24
if
(data.Length == 2)
25
{
26
Server
= data[0];
27
Port
= Convert.ToInt32(data[1]);
28
}
29
}
30
}
31
32
public
class
CustomClassOptions
33
{
34
[Option(
'c'
,
"custom"
, HelpText =
"Custom Type"
)]
35
public
CustomClass
Custom
{
get
;
set
; }
36
}
37
38
public
class
CustomClass
39
{
40
public
string
Input
{
get
;
set
; }
41
public
string
Server
{
get
;
set
; }
42
public
int
Port
{
get
;
set
; }
43
public
CustomClass
(
string
url)
44
{
45
Input
= url;
46
Server
=
""
;
47
Port
= 80;
48
var data = url.Split(
':'
);
49
if
(data.Length == 2)
50
{
51
Server
= data[0];
52
Port
= Convert.ToInt32(data[1]);
53
}
54
}
55
}
56
}
CommandLine.Tests.Fakes.CustomClass
Definition
Custom_Struct.cs:39
CommandLine.Tests.Fakes.CustomClass.Server
string Server
Definition
Custom_Struct.cs:41
CommandLine.Tests.Fakes.CustomClass.Port
int Port
Definition
Custom_Struct.cs:42
CommandLine.Tests.Fakes.CustomClass.CustomClass
CustomClass(string url)
Definition
Custom_Struct.cs:43
CommandLine.Tests.Fakes.CustomClass.Input
string Input
Definition
Custom_Struct.cs:40
CommandLine.Tests.Fakes.CustomClassOptions
Definition
Custom_Struct.cs:33
CommandLine.Tests.Fakes.CustomClassOptions.Custom
CustomClass Custom
Definition
Custom_Struct.cs:35
CommandLine.Tests.Fakes.CustomStructOptions
Definition
Custom_Struct.cs:8
CommandLine.Tests.Fakes.CustomStructOptions.Custom
CustomStruct Custom
Definition
Custom_Struct.cs:10
CommandLine.Tests.Fakes
Definition
Custom_Struct.cs:6
CommandLine.Tests.Fakes.CustomStruct
Definition
Custom_Struct.cs:14
CommandLine.Tests.Fakes.CustomStruct.CustomStruct
CustomStruct(string url)
Definition
Custom_Struct.cs:18
CommandLine.Tests.Fakes.CustomStruct.Server
string Server
Definition
Custom_Struct.cs:16
CommandLine.Tests.Fakes.CustomStruct.Port
int Port
Definition
Custom_Struct.cs:17
CommandLine.Tests.Fakes.CustomStruct.Input
string Input
Definition
Custom_Struct.cs:15
deps
commandlineparser
tests
CommandLine.Tests
Fakes
Custom_Struct.cs
Generated by
1.9.8