public void SerializeNestedIgnoreList()
        {
            var list1 = new SomeIgnoreList()
            {
                new ListItem("aaa"), new ListItem("bbb")
            };
            var list2 = new SomeIgnoreList()
            {
                new ListItem("ccc"), new ListItem("ddd")
            };
            var nestedList = new NestedIgnoreList();

            nestedList.Add(list1);
            nestedList.Add(list2);

            Serializer.Serialize(Stream.Null, nestedList);
        }
        public void ExecuteNestedIgnoreList()
        {
            var typeModel = TypeModel.Create();

            typeModel.AutoCompile = true;
            var list1 = new SomeIgnoreList()
            {
                new ListItem("aaa"), new ListItem("bbb")
            };
            var list2 = new SomeIgnoreList()
            {
                new ListItem("ccc"), new ListItem("ddd")
            };
            var nestedList = new NestedIgnoreList();

            nestedList.Add(list1);
            nestedList.Add(list2);

            var clone = (NestedIgnoreList)typeModel.DeepClone(nestedList);

            Assert.AreEqual(clone.Count, 2);
            Assert.AreEqual(clone[0].Count, 0); //IgnoreListHandling causes contents of nested lists to be lost
            Assert.AreEqual(clone[1].Count, 0);
        }