System.Runtime.Serialization.PrimitiveDataContract.PrimitiveDataContract.TryReadNullAtTopLevel C# (CSharp) Метод

TryReadNullAtTopLevel() защищенный Метод

protected TryReadNullAtTopLevel ( System.Runtime.Serialization.XmlReaderDelegator reader ) : bool
reader System.Runtime.Serialization.XmlReaderDelegator
Результат bool
        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;
        }