public void OnChangeWithinMethod(bool withinmethod) { if (_writer == null) { _writer = XmlSerializerUtility.GetWriter(_reader) as XmlObjectWriter; } if (_writer != null && _xmlNode != null) { if (withinmethod) { _xmlNodeChanged = _xmlNode.OwnerDocument.CreateElement(_xmlNode.Name); _writer.WriteObjectToNode(_xmlNodeChanged, this); } else { _writer.WriteObjectToNode(_xmlNode, this); } } }
public void UpdateXmlNode(XmlObjectWriter writer) { if (_xmlNode != null) { if (writer != null) { writer.WriteObjectToNode(_xmlNode, this); } else { if (_writer == null) { _writer = XmlSerializerUtility.GetWriter(_reader) as XmlObjectWriter; } if (_writer != null) { _writer.WriteObjectToNode(_xmlNode, this); } } } }