Exemple #1
0
 public void OnPostSerialize(XmlSerializer.ObjectIDmap objMap, System.Xml.XmlNode objectNode, bool saved, object serializer)
 {
     if (saved)
     {
     }
     else
     {
         if (_pointer == null && _memberPointer == null)
         {
             XmlNode node = SerializeUtil.GetClassRefNodeByObjectId(objectNode, _memberId);
             if (node != null)
             {
                 XmlObjectReader xr = (XmlObjectReader)serializer;
                 _pointer = xr.ReadObject <ClassInstancePointer>(node, ClassPointer.CreateClassPointer(objMap));
                 //_pointer.ObjectInstance = objMap.GetObjectByID(_pointer.MemberId);
             }
             else
             {
                 _pointer = objMap.GetClassRefById(_memberId) as ClassInstancePointer;
             }
         }
         if (_pointer == null)
         {
             object v = objMap.GetObjectByID(_memberId);
             if (v != null)
             {
                 _memberPointer = new MemberComponentId(objMap.GetTypedData <ClassPointer>(), v, _memberId);
             }
         }
         if (_pointer == null && _memberPointer == null)
         {
             objMap.AddPostProcessor(this);
         }
     }
 }