-
Notifications
You must be signed in to change notification settings - Fork 2
/
Program.cs
48 lines (42 loc) · 1.11 KB
/
Program.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
using System;
using System.Threading.Tasks;
namespace conversions
{
class Program
{
static async Task Main()
{
var samples = new IRun[]
{
new Xml(),
new Json(),
new JsonSimple(),
new JsonNet(),
new Csv(),
new Yaml(),
new Toml()
};
Console.WriteLine("Conversion Extravaganza!");
var friend = new Friend
{
Id = 1,
Debt = 10m,
Met = DateTime.Now,
Name = "Khalid Abuhakmeh"
};
foreach (var sample in samples)
{
Console.WriteLine($"--- Running {sample.Name} ---\n");
await sample.RunAsync(friend);
Console.WriteLine();
}
}
}
public class Friend
{
public int Id { get; set; }
public string Name { get; set; }
public DateTime Met { get; set; }
public decimal Debt { get; set; }
}
}