Ejemplo n.º 1
0
        public override void VisitDictionaryKeyValue(object dictionary, DictionaryDescriptor descriptor, object key, ITypeDescriptor keyDescriptor, object value, ITypeDescriptor valueDescriptor)
        {
            var node = stackItems.Peek();
            // TODO modify DataVisitorBase to allow only IDictionary?
            var newNode = new DataVisitDictionaryItem(key, keyDescriptor, value, valueDescriptor);

            AddItem(node, newNode);

            stackItems.Push(newNode);
            base.VisitDictionaryKeyValue(dictionary, descriptor, key, keyDescriptor, value, valueDescriptor);
            stackItems.Pop();
        }
Ejemplo n.º 2
0
        public override void VisitDictionaryKeyValue(object dictionary, DictionaryDescriptor descriptor, object key, ITypeDescriptor keyDescriptor, object value, ITypeDescriptor valueDescriptor)
        {
            var node = stackItems.Peek();
            // TODO modify DataVisitorBase to allow only IDictionary?
            var newNode = new DataVisitDictionaryItem(key, keyDescriptor, value, valueDescriptor);
            AddItem(node, newNode);

            stackItems.Push(newNode);
            base.VisitDictionaryKeyValue(dictionary, descriptor, key, keyDescriptor, value, valueDescriptor);
            stackItems.Pop();
        }