Read() private method

private Read ( System.Runtime.Serialization.XmlReaderDelegator reader ) : void
reader System.Runtime.Serialization.XmlReaderDelegator
return void
        internal virtual void ReadAttributes(XmlReaderDelegator xmlReader)
#endif
        {
            if (attributes == null)
            {
                attributes = new Attributes();
            }
            attributes.Read(xmlReader);
        }
示例#2
0
        protected static bool TryReadNullAtTopLevel(XmlReaderDelegator reader)
        {
            Attributes attributes = new Attributes();

            attributes.Read(reader);
            if (attributes.Ref != Globals.NewObjectId)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CannotDeserializeRefAtTopLevel, attributes.Ref)));
            }
            if (attributes.XsiNil)
            {
                reader.Skip();
                return(true);
            }
            return(false);
        }
示例#3
0
 protected bool TryReadNullAtTopLevel(XmlReaderDelegator reader)
 {
     Attributes attributes = new Attributes();
     attributes.Read(reader);
     if (attributes.Ref != Globals.NewObjectId)
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CannotDeserializeRefAtTopLevel, attributes.Ref)));
     if (attributes.XsiNil)
     {
         reader.Skip();
         return true;
     }
     return false;
 }