Prepare
The Prepare method does the following:
- Uses the CreateFeatureSourceDefinition utility method to create the XML data for connecting to a MySql feature source given a set of connection settings hard-coded within the Prepare method source.
- Uses the GetNewResourceId function to generate a resource Id value that is not currently used.
- Passes the resource Id to the TestConnection method of the FeatureService object. If the connection does not work, an error message is printed and Prepare exits.
- Calls the utility method AddAllToMap to add all the features in the MySql feature source to the document.