protected bool TryReadNullAtTopLevel(XmlReaderDelegator reader)
 {
     System.Runtime.Serialization.Attributes attributes = new System.Runtime.Serialization.Attributes();
     attributes.Read(reader);
     if (attributes.Ref != Globals.NewObjectId)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(System.Runtime.Serialization.SR.GetString("CannotDeserializeRefAtTopLevel", new object[] { attributes.Ref })));
     }
     if (attributes.XsiNil)
     {
         reader.Skip();
         return true;
     }
     return false;
 }
Example #2
0
 protected bool TryReadNullAtTopLevel(XmlReaderDelegator reader)
 {
     System.Runtime.Serialization.Attributes attributes = new System.Runtime.Serialization.Attributes();
     attributes.Read(reader);
     if (attributes.Ref != Globals.NewObjectId)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(System.Runtime.Serialization.SR.GetString("CannotDeserializeRefAtTopLevel", new object[] { attributes.Ref })));
     }
     if (attributes.XsiNil)
     {
         reader.Skip();
         return(true);
     }
     return(false);
 }