public override void fixup(object ignored, object ignored2) { ReferenceRecord record = _reader.getRecord(_ID); if (record == null) { Debug.WriteLine("Referenced identifier #" + _ID + " not found in document"); throw new XmlException(SR.Format(SR.XmlS_UnknownID_1, _ID)); } record.referenced = true; _nestedFixup.fixup(_nestedTarget, record.value); }
/// <summary> /// This method assigns elements in the temporary ArrayList to the array-like member. /// The fixup used is a member fixup, so the elements are assigned directly to the /// fixupTarget's array-like member. If there is identifer for this member /// (encoded messages only), then a ReferenceRecord is created with the temporary /// ArrayList. /// </summary> /// <remarks> /// PERF: The ReferenceRecord contains the temporary ArrayList and not the transformed /// array-like value. So, we have to transform the ArrayList to the correct array-like /// everytime a reference to this array-like is dereference. If the collection is large /// and there are multiple references to it, then this could be a big performance bottle /// neck. /// </remarks> internal void doAssignment() { object elements = Elements; if (_identifier != null) { if (_IDCache.ContainsKey(_identifier)) { Debug.WriteLine("The identifier " + _identifier + " appears more than once."); throw new XmlException(SR.Format(SR.XmlS_RepeatedIdentifier_1, _identifier)); } ReferenceRecord record = new ReferenceRecord(_identifier, elements); _IDCache[_identifier] = record; } _memberFixup.fixup(_memberFixupTarget, elements); }