TrackingProfileSerializer.Deserialize(TextReader) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Deserializes the XML document that is contained in the text reader by using the tracking profile XML Schema definition (XSD).
public:
System::Workflow::Runtime::Tracking::TrackingProfile ^ Deserialize(System::IO::TextReader ^ reader);
public System.Workflow.Runtime.Tracking.TrackingProfile Deserialize (System.IO.TextReader reader);
member this.Deserialize : System.IO.TextReader -> System.Workflow.Runtime.Tracking.TrackingProfile
Public Function Deserialize (reader As TextReader) As TrackingProfile
Parameters
- reader
- TextReader
A TextReader that contains an XML document.
Returns
A TrackingProfile that contains the deserialized tracking profile.
Exceptions
reader
is a null reference (Nothing
in Visual Basic).
reader
does not contain a document that conforms to the tracking profile XSD.
Remarks
Deserialization refers to the process of creating an object from a well-formed XML document. Deserialize uses the tracking profile XSD contained in Schema to deserialize the XML document that is contained in the text reader into a valid TrackingProfile. Validation on the XML document is performed during deserialization, and, if the document is not valid, a TrackingProfileDeserializationException is thrown. You can catch this exception and examine ValidationEventArgs to determine the cause of the validation error. If there are any unhandled exceptions while deserializing the tracking profile then the workflow instance for which the tracking profile was requested will be terminated.
Note
If you want to perform validation without deserializing the XML representation of a tracking profile, you can write your own tracking profile validator. See the Schema property for more information.