static void TestDocListHooks() { DocList <IDocLeaf> list = new DocList <IDocLeaf>(); list.Hook += TestDocListHook; DocObj <string> obj0 = new DocObj <string>("Hello World"); DocObj <string> obj1 = new DocObj <string>("Hello World"); list.Add(obj0); list.Remove(obj0); list.Add(obj0); list.Add(obj1); list.Clear(); list.Clear(); }
static void TestDocListCollectionChanged() { DocList <IDocLeaf> list = new DocList <IDocLeaf>(); list.CollectionChanged += TestDocListOnCollectionChanged; ((INotifyPropertyChanged)list).PropertyChanged += TestDocListOnCollectionChanged2; DocObj <string> obj0 = new DocObj <string>("Hello World"); DocObj <string> obj1 = new DocObj <string>("Hello World"); list.Add(obj0); list.Remove(obj0); list.Add(obj0); list.Add(obj1); list.Clear(); list.Clear(); }