-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
33 lines (29 loc) · 693 Bytes
/
Copy pathProgram.cs
File metadata and controls
33 lines (29 loc) · 693 Bytes
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
using Adapter.Optimized;
using Adapter.RealWorld;
using Adapter.Structural;
var app = string.Empty;
var validApps = new List<string> { "s", "r", "o" };
while (true)
{
Console.Write("Enter the application [Structural (s), Real World (r), Optimized (o)] :");
app = Console.ReadLine();
app = app?.ToLower() ?? string.Empty;
if (app == "q")
return;
else if (!validApps.Contains(app))
Console.WriteLine("Invalid application selected.");
else
break;
}
switch (app)
{
case "s":
StructuralCode.Run();
break;
case "r":
RealWorldCode.Run();
break;
case "o":
OptimizedCode.Run();
break;
}