TrackingProfileSerializer.Serialize(TextWriter, TrackingProfile) 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.
Serializes the tracking profile into an XML document by using the tracking profile XML Schema definition (XSD).
public:
void Serialize(System::IO::TextWriter ^ writer, System::Workflow::Runtime::Tracking::TrackingProfile ^ profile);
public void Serialize(System.IO.TextWriter writer, System.Workflow.Runtime.Tracking.TrackingProfile profile);
member this.Serialize : System.IO.TextWriter * System.Workflow.Runtime.Tracking.TrackingProfile -> unit
Public Sub Serialize (writer As TextWriter, profile As TrackingProfile)
Parameters
- writer
- TextWriter
A valid TrackingProfile.
- profile
- TrackingProfile
When this method returns, contains a TextWriter that holds the XML document. The parameter is passed uninitialized.
Exceptions
profile
is not a valid tracking profile.
Remarks
Serialization refers to the process of creating a well-formed XML document from a valid TrackingProfile. Serialize uses the tracking profile Schema to serialize the tracking profile. profile
must be a valid TrackingProfile that contains at least one valid track point. Validation on the tracking profile is performed during serialization, and, if the tracking profile is not valid, an ArgumentException is thrown. You can catch this exception and examine its message property to determine the cause of the validation error. If there are any unhandled exceptions while serializing the tracking profile, then the workflow instance for which the tracking profile was requested is terminated.