Debian Codegraph @

external/cecil/symbols/pdb/Test/Resources/assemblies/ComplexPdb.cs

raw
1 using System;
2 using System.Collections.Generic;
3 using System.Threading.Tasks;
4 using static System.Console;
5 using Foo1 = System.Console;
6 using Foo2 = System.Reflection;
7
8 namespace ComplexPdb
9 {
10 public class Program
11 {
12 private static void Foo()
13 {
14 const string s = "const string";
15 const int f = 1;
16 const object o = null;
17 const string u = null;
18 WriteLine(s);
19 WriteLine(2);
20 }
21
22 private static void Bar(int i)
23 {
24 int result;
25 if (i < 0)
26 {
27 int s = 1;
28 result = s;
29 }
30 else
31 {
32 const int b = 12;
33 const decimal c = 74;
34 int s = -1;
35 result = s + b + (int)c;
36 if (result > b)
37 {
38 int u = result * b;
39 Console.WriteLine(u);
40 }
41 }
42 WriteLine(result);
43 }
44
45 public async Task TestAsync()
46 {
47 WriteLine("Hello1");
48 await Task.Delay(100);
49
50 for (int i = 0; i < 4; ++i)
51 {
52 WriteLine("Hello2");
53 await Task.Delay(100);
54 WriteLine("Hello3");
55 }
56 }
57
58 public IEnumerable<string> TestIterator()
59 {
60 WriteLine("Hello1");
61 yield return "Hello1";
62
63 for (int i = 0; i < 4; ++i)
64 {
65 WriteLine("Hello1");
66 yield return "Hello2";
67 WriteLine("Hello3");
68 }
69 }
70 }
71 }