forked from CHMP-HLab/HLab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
42 lines (35 loc) · 1.2 KB
/
Copy pathProgram.cs
File metadata and controls
42 lines (35 loc) · 1.2 KB
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
using System;
using HLab.Notify.PropertyChanged;
namespace HLab.MemoryLeak
{
class Program
{
static void Main(string[] args)
{
var dc = new DummyContainer() { };
while (true)
{
Console.WriteLine("any key to create dummy container");
Console.ReadKey();
//Create();
var d1 = new Dummy {Property = "a"};
var d2 = new Dummy {Property = "b"};
dc.Dummies.Add(d1);
Console.WriteLine("add a dummy : " + dc.Property);
dc.Dummies.Add(d2);
Console.WriteLine("add b dummy : " + dc.Property);
dc.Dummies.Remove(d1);
Console.WriteLine("remove a dummy : " + dc.Property);
dc.Dummies.Remove(d2);
Console.WriteLine("remove b dummy : " + dc.Property);
}
}
private static void Create()
{
var dc = new DummyContainer() { };
var d = new Dummy {Property = "test"};
dc.Dummies.Add(d);
Console.WriteLine("there was a dummy : " + d.Property);
}
}
}