public void AddAndReleaseSemantics() { var parent = new SimpleParent(); var child = new Lists.ListMonitors.NotifyChildBase <SimpleParent>(); var list = new ParentList <Lists.ListMonitors.NotifyChildBase <SimpleParent>, SimpleParent>(parent); Assert.Null(child.Parent); using (var foo = INPCCounter.VerifyInpcFired(child, o => o.Parent)) { list.Add(child); } Assert.Equal(parent, child.Parent); using (var foo = INPCCounter.VerifyInpcFired(child, o => o.Parent)) { list.RemoveAt(0); } Assert.Null(child.Parent); }
private void DeleteMe() { ParentList.RemoveAt(Index); }