-
Notifications
You must be signed in to change notification settings - Fork 93
/
RunExamples.cs
91 lines (89 loc) · 3.82 KB
/
RunExamples.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
using System;
using System.Threading.Tasks;
namespace Examples
{
public static class RunExamples
{
/// <summary>
/// specify name of example in configuration Program arguments e.g. FluxExample
/// </summary>
/// <param name="args"></param>
public static async Task Main(string[] args)
{
if (args.Length >= 1 && !string.IsNullOrEmpty(args[0]))
{
Console.WriteLine($"Run solution: {args[0]}");
Console.WriteLine("====================================");
switch (args[0])
{
case "FluxExample":
await FluxExample.Main();
break;
case "FluxClientSimpleExample":
await FluxClientSimpleExample.Main();
break;
case "FluxRawExample":
await FluxRawExample.Main();
break;
case "FluxClientFactoryExample":
await FluxClientExample.Main();
break;
case "FluxClientPocoExample":
await FluxClientPocoExample.Main();
break;
case "PlatformExample":
await PlatformExample.Main();
break;
case "WriteEventHandlerExample":
await WriteEventHandlerExample.Main();
break;
case "WriteApiAsyncExample":
await WriteApiAsyncExample.Main();
break;
case "PocoQueryWriteExample":
await PocoQueryWriteExample.Main();
break;
case "CustomDomainMappingAndLinq":
await CustomDomainMappingAndLinq.Main();
break;
case "InfluxDB18Example":
await InfluxDB18Example.Main();
break;
case "SynchronousQuery":
SynchronousQuery.Main();
break;
case "CustomDomainMapping":
await CustomDomainMapping.Main();
break;
case "QueryLinqCloud":
QueryLinqCloud.Main();
break;
case "ManagementExample":
await ManagementExample.Main();
break;
case "InvokableScripts":
await InvokableScripts.Main();
break;
case "ParametrizedQuery":
await ParametrizedQuery.Main();
break;
case "RecordRowExample":
await RecordRowExample.Main();
break;
case "HttpErrorHandling":
await HttpErrorHandling.Main();
break;
}
}
else
{
Console.WriteLine("Please specify the name of example. One of: " +
"FluxExample, FluxClientSimpleExample, FluxRawExample, FluxClientFactoryExample, " +
"FluxClientPocoExample, PlatformExample, WriteEventHandlerExample, WriteApiAsyncExample, " +
"CustomDomainMapping, PocoQueryWriteExample, CustomDomainMappingAndLinq, " +
"SynchronousQuery, InfluxDB18Example, QueryLinqCloud, ManagementExample, " +
" InvokableScripts, ParametrizedQuery, RecordRowExample");
}
}
}
}