MindFusion.Wpf Pack Programmer's Guide
Serializing the Schedule

XML Serialization

The SaveTo and LoadFrom methods of the Schedule class let you save and load complete schedules to/from XML documents.

The serialization methods of the Schedule work by invoking the SaveTo and LoadFrom methods of the Item and Resource classes or the classes derived from them. If you define your own Item or Resource-derived classes, you must override the SaveTo and LoadFrom methods and register the classes for serialization by calling the RegisterItemClass and RegisterResourceClass methods of the Schedule.

JSON Serialization

Schedules can be serialized in JSON format. This can be used for interoperability with MindFusion JavaScript scheduling library, or for general storage in JSON files or databases. To serialize a Schedule to a JSON string, call its SaveToJson method. To deserialize a schedule back from its JSON representation, call the LoadFromJson method. Custom item classes can implement JSON serialization for their additional properties by overriding the SaveTo(JsonObject) and LoadFrom(JsonObject) methods of base Item class. Such classes must be registered for serialization by calling the RegisterItemClass method and providing a string identifier for the clientClass parameter.