Skip to content

Commit 3837087

Browse files
committed
demo dumps
1 parent df5b205 commit 3837087

File tree

1 file changed

+48
-3
lines changed

1 file changed

+48
-3
lines changed

Program.cs

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,60 @@
11
using Desharp;
22
using System;
3+
using System.Collections.Generic;
34

45
class Program {
56
static void Main(string[] args) {
67

8+
Program._demoDumpAndLog();
9+
Program._demoException();
10+
//Program._runTests();
11+
12+
Console.ReadLine();
13+
}
14+
private static void _demoDumpAndLog() {
15+
Console.Write("Press enter key to dump demo data and write it to HDD.");
16+
Console.ReadLine();
17+
18+
var demoObject = new Dictionary<string, object>() {
19+
{ "clark", new {
20+
name = "Clark",
21+
surname = "Kent",
22+
tshirtIdol = "chuck"
23+
} },
24+
{ "chuck", new {
25+
name = "Chuck",
26+
surname = "Noris",
27+
tshirtIdol = "bud"
28+
} },
29+
{ "bud", new {
30+
name = "Bud",
31+
surname = "Spencer",
32+
tshirtIdol = ""
33+
} }
34+
};
35+
36+
Debug.Dump(demoObject);
37+
Debug.Log(demoObject);
38+
}
39+
private static void _demoException () {
40+
Console.Write("Press enter key to dump catched demo exception and write it to HDD.");
41+
Console.ReadLine();
42+
43+
try {
44+
throw new Exception("Demo exception:-)");
45+
} catch (Exception ex) {
46+
Debug.Dump(ex);
47+
Debug.Log(ex);
48+
}
49+
}
50+
private static void _runTests () {
51+
Console.Write("Pres enter key to start duping test objects.");
52+
Console.ReadLine();
53+
754
var dlTest = new Tests.DumpingAndLoging();
855
dlTest.TestAll();
9-
56+
1057
var eTest = new Tests.ExceptionsRendering();
1158
eTest.TestAll();
12-
13-
Console.ReadLine();
1459
}
1560
}

0 commit comments

Comments
 (0)