Search
Schedule.registerClass Method
See Also
 






Registers a schedule item or resource class for serialization support.

Namespace: MindFusion.Scheduling
File: Schedule.js

 Syntax

JavaScript  Copy Code

function registerClass (itemClass, xmlClassId, jsonClassId, classVersion)

 Parameters

itemClass

Object. An object identifying the class.

xmlClassId

String. A class identifier to use when saving and loading objects of the specified type to and from XML.

jsonClassId

String. A class identifier to use when saving and loading objects of the specified type to and from JSON.

classVersion

Number. A revision number of the objects's class serialization format.

 Example

The following code shows how to register a custom event class called CustomEvent:

JavaScript  Copy Code
var p = MindFusion.Scheduling;
p.Schedule.registerClass(CustomEvent, "[custom:customEvent]", "customEvent", 1);

 See Also