XmlSerializationReader Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Controls deserialization by the XmlSerializer class.

Inheritance Hierarchy

System.Object
  System.Xml.Serialization.XmlSerializationGeneratedCode
    System.Xml.Serialization.XmlSerializationReader

Namespace:  System.Xml.Serialization
Assembly:  System.Xml.Serialization (in System.Xml.Serialization.dll)

Syntax

'Declaration
Public MustInherit Class XmlSerializationReader _
    Inherits XmlSerializationGeneratedCode
public abstract class XmlSerializationReader : XmlSerializationGeneratedCode

The XmlSerializationReader type exposes the following members.

Constructors

  Name Description
Protected method XmlSerializationReader Infrastructure. Initializes a new instance of the XmlSerializationReader class.

Top

Properties

  Name Description
Protected property DecodeName Infrastructure. Gets or sets a value that determines whether XML strings are translated into valid Silverlight type names.
Protected property IsReturnValue Infrastructure. Gets or sets a value that should be true for a SOAP 1.1 return value.
Protected property Reader Gets the XmlReader object that is being used by XmlSerializationReader.
Protected property ReaderCount Gets the current count of the XmlReader.

Top

Methods

  Name Description
Protected method CheckReaderCount Checks whether the deserializer has advanced.
Protected method CollapseWhitespace Removes all occurrences of white space characters from the beginning and end of the specified string.
Protected method CreateAbstractTypeException Creates an InvalidOperationException that indicates that an object being deserialized should be abstract.
Protected method CreateBadDerivationException Populates an object from its XML representation at the current location of the XmlReader, with an option to read the inner element.
Protected method CreateCtorHasSecurityException Creates an InvalidOperationException that indicates that an object being deserialized cannot be instantiated because the constructor throws a security exception.
Protected method CreateInaccessibleConstructorException Creates an InvalidOperationException that indicates that an object being deserialized cannot be instantiated because there is no constructor available.
Protected method CreateInvalidCastException(Type, Object) Creates an InvalidCastException that indicates that an explicit reference conversion failed.
Protected method CreateInvalidCastException(Type, Object, String) Creates an InvalidCastException that indicates that an explicit reference conversion failed.
Protected method CreateMissingIXmlSerializableType Creates an InvalidOperationException that indicates that a derived type that is mapped to an XML Schema data type cannot be located.
Protected method CreateReadOnlyCollectionException Creates an InvalidOperationException that indicates that a SOAP-encoded collection type cannot be modified and its values cannot be filled in.
Protected method CreateUnknownConstantException Creates an InvalidOperationException that indicates that an enumeration value is not valid.
Protected method CreateUnknownNodeException Creates an InvalidOperationException that indicates that the current position of XmlReader represents an unknown XML node.
Protected method CreateUnknownTypeException Creates an InvalidOperationException that indicates that a type is unknown.
Protected method EnsureArrayIndex Ensures that a given array, or a copy, is large enough to contain a specified index.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Protected method GetNullAttr Infrastructure. Determines whether the XML element where the XmlReader is currently positioned has a null attribute set to the value true.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method GetXsiType Gets the value of the xsi:type attribute for the XML element at the current location of the XmlReader.
Protected method InitCallbacks Initializes callback methods that populate objects that map to SOAP-encoded XML data.
Protected method InitIDs Infrastructure. Stores element and attribute names in a NameTable object.
Protected method IsXmlnsAttribute Infrastructure. Determines whether an XML attribute name indicates an XML namespace.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method ReadElementQualifiedName Makes the XmlReader read the fully qualified name of the element where it is currently positioned.
Protected method ReadEndElement Makes the XmlReader read an XML end tag.
Protected method ReadNull Instructs the XmlReader to read the current XML element if the element has a null attribute with the value true.
Protected method ReadNullableQualifiedName Instructs the XmlReader to read the fully-qualified name of the element where it is currently positioned.
Protected method ReadNullableString Instructs the XmlReader to read a simple, text-only XML element that could be nulla null reference (Nothing in Visual Basic).
Protected method ReadSerializable(IXmlSerializable) Populates an object from its XML representation at the current location of the XmlReader.
Protected method ReadSerializable(IXmlSerializable, Boolean) This method supports the .NET Framework infrastructure and is not intended to be used directly from your code. Populates an object from its XML representation at the current location of the XmlReader.
Protected method ReadString(String) Produces the result of a call to the ReadString method appended to the input value.
Protected method ReadString(String, Boolean) Returns the result of a call to the ReadString method of the XmlReader class, trimmed of white space if required, and appended to the input value.
Protected method ReadTypedNull Reads an XML element that allows null values (xsi:nil = 'true') and returns a generic Nullable<T> value.
Protected method ReadTypedPrimitive Gets the value of the XML node at which the XmlReader is currently positioned.
Protected method ShrinkArray Ensures that a given array, or a copy, is no larger than a specified length.
Protected method ToByteArrayBase64(Boolean) Instructs the XmlReader to read the string value at its current position and return it as a base-64 byte array.
Protected methodStatic member ToByteArrayBase64(String) Produces a base-64 byte array from an input string.
Protected method ToByteArrayHex(Boolean) Instructs the XmlReader to read the string value at its current position and return it as a hexadecimal byte array.
Protected methodStatic member ToByteArrayHex(String) Produces a hexadecimal byte array from an input string.
Protected methodStatic member ToChar Produces a Char object from an input string.
Protected methodStatic member ToDate Produces a DateTime object from an input string.
Protected methodStatic member ToDateTime Produces a DateTime object from an input string.
Protected methodStatic member ToEnum This method supports the .NET Framework infrastructure and is not intended to be used directly from your code. Produces a numeric enumeration value from a string that consists of delimited identifiers that represent constants from the enumerator list.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Protected methodStatic member ToTime Produces a DateTime object from a string that represents the time.
Protected methodStatic member ToXmlName Decodes an XML name.
Protected methodStatic member ToXmlNCName Decodes an XML name.
Protected methodStatic member ToXmlNmToken Decodes an XML name.
Protected methodStatic member ToXmlNmTokens Decodes an XML name.
Protected method ToXmlQualifiedName Obtains an XmlQualifiedName from a name that might contain a prefix.
Protected method UnknownNode(Object) Raises an UnknownNode event for the current position of the XmlReader.
Protected method UnknownNode(Object, String) Raises an UnknownNode event for the current position of the XmlReader.

Top

Remarks

During initialization, the Silverlight XML serialization infrastructure dynamically generates and compiles a temporary class for deserialization that is derived from the abstract XmlSerializationReader class. XmlSerializationReader is also implemented within Silverlight for deserialization of XML documents into DiscoveryDocument and ServiceDescription objects.

You should not derive classes from XmlSerializationReader. Instead, call one of the Deserialize methods.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.