System.Runtime.Serialization
4.0.0.0
System.Object
Extend the to create your own serializer to serialize and deserialize objects. Both the class and the class inherit from the and are used to serialize and deserialize objects that conform to data contract rules (objects created using the and the ).
Provides the base class used to serialize objects as XML streams or documents. This class is abstract.
Constructor
4.0.0.0
This constructor is marked protected to allow derived classes to chain constructors.
Initializes a new instance of the class.
Method
4.0.0.0
System.Boolean
This method checks if the reader is positioned on an element to read, and returns true if the element is the top-level element for the object found in the XML stream or document. The implementation determines when to return true. Implementations may check that they are positioned on an element or look for an expected element name. One implementation of the , the , checks that it is positioned on an element and also checks that the element name is the top level expected name for the type currently being deserialized.
If needed, additional attributes in the XML stream can be read while positioned on the top level element before reading XML contents using the method.
Gets a value that specifies whether the is positioned over an XML element that can be read.
true if the reader can read the data; otherwise, false.
An used to read the XML stream or document.
Method
4.0.0.0
System.Boolean
This method checks whether the reader is positioned on an element to read, and returns true if the element is the top-level element for the object found in the XML stream or document. To return true, the found element must have an expected name. The actual expected element name depends on the implementation of the serializer.
With the , the starting element is specified in the constructor of the extension class. For an example, see the constructors for the class.
Gets a value that specifies whether the is positioned over an XML element that can be read.
true if the reader is positioned over the starting element; otherwise, false.
An used to read the XML stream or document.
Method
4.0.0.0
System.Object
This method is a virtual method, and has a default implementation that creates a dictionary reader to read the underlying stream and deserialize it. The default implementation assumes the stream is text or XML.
Reads the XML stream or document with a and returns the deserialized object.
The deserialized object.
A used to read the XML stream or document.
Method
4.0.0.0
System.Object
This method is a virtual method, and has a default implementation that creates a dictionary reader to read the underlying stream and deserialize it. The default implementation assumes the stream is text or XML.
Reads the XML document or stream with an and returns the deserialized object.
The deserialized object.
An used to read the XML document.
Method
4.0.0.0
System.Object
To be added.
Reads the XML document or stream with an and returns the deserialized object.
The deserialized object.
An used to read the XML stream or document.
Method
4.0.0.0
System.Object
To be added.
The parameter uses the same code as the method to determine whether the element is the start of the object.
Reads the XML stream or document with an and returns the deserialized object; it also enables you to specify whether the serializer can read the data before attempting to read it.
The deserialized object.
An used to read the XML document.
Method
4.0.0.0
System.Object
To be added.
The parameter uses the same code as the method to determine whether the element is the start of the object.
Reads the XML document or stream with an and returns the deserialized object; it also enables you to specify whether the serializer can read the data before attempting to read it.
The deserialized object.
An used to read the XML document or stream.
Method
4.0.0.0
System.Void
To be added.
Writes the end of the object data as a closing XML element to the XML document or stream with an .
An used to write the XML document or stream.
Method
4.0.0.0
System.Void
To be added.
Writes the end of the object data as a closing XML element to the XML document or stream with an .
An used to write the XML document or stream.
Method
4.0.0.0
System.Void
To be added.
Writes the complete content (start, content, and end) of the object to the XML document or stream with the specified .
A used to write the XML document or stream.
The object that contains the data to write to the stream.
Method
4.0.0.0
System.Void
This is a virtual method and has a default implementation that calls the , , and methods. Because of this, this method is intended to be the most commonly used method on a serializer.
Writes the complete content (start, content, and end) of the object to the XML document or stream with the specified .
An used to write the content to the XML document or stream.
The object that contains the content to write.
Method
4.0.0.0
System.Void
This is a virtual method, and has a default implementation that delegates writing to the overload.
Writes the complete content (start, content, and end) of the object to the XML document or stream with the specified .
An used to write the XML document or stream.
The object that contains the content to write.
Method
4.0.0.0
System.Void
To be added.
Writes only the content of the object to the XML document or stream using the specified .
An used to write the XML document or stream.
The object that contains the content to write.
Method
4.0.0.0
System.Void
To be added.
Writes only the content of the object to the XML document or stream with the specified .
An used to write the XML document or stream.
The object that contains the content to write.
Method
4.0.0.0
System.Void
To be added.
Writes the start of the object's data as an opening XML element using the specified .
An used to write the XML document.
The object to serialize.
Method
4.0.0.0
System.Void
To be added.
Writes the start of the object's data as an opening XML element using the specified .
An used to write the XML document.
The object to serialize.