コード例 #1
0
        private static void UpdateObjectWithValue(TreeGridNode rootNode, params Change[] changes)
        {
            foreach (Change change in changes)
            {
                TreeGridNode found = FindObjectInTree(rootNode, change.OldValue);
                Assert.IsNotNull(found);

                RenderHierarchy.TryUpdateValueType(found, change.NewValue);
            }
        }
コード例 #2
0
        public void TestSimpleCollectionsAreExcluded()
        {
            RunInSTAThread(
                delegate
            {
                Db.Store(new ComplexItem <int>(1, 2, 3));
                Reopen();

                object obj            = RetrieveOnlyObject(typeof(ComplexItem <int>));
                TreeGridNode rootNode = RootNodeFor(obj);

                Assert.IsFalse(RenderHierarchy.TryUpdateValueType(SubItemValueFieldForIntCollection(rootNode, 2), 10));
            });
        }
コード例 #3
0
        public void TestChildCollectionsAreExcluded()
        {
            RunInSTAThread(
                delegate
            {
                Db.Store(new Test(1, NewHashTable(1, 2, 3, 4, 5)));
                Reopen();

                object obj = RetrieveOnlyObject(typeof(Test));
                Db.Ext().Activate(obj, 10);
                TreeGridNode rootNode = RootNodeFor(obj);

                Assert.IsFalse(RenderHierarchy.TryUpdateValueType(FindTreeNodeWithInt(rootNode, 5), 10));
            });
        }