コード例 #1
0
 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);
         }
     }
 }
コード例 #2
0
 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);
             }
         }
     }
 }