Пример #1
0
        /// <summary>
        /// Parse the startup sequence element (<see cref="ConstInterface.MG_TAG_STARTUP_PROGRAM"/>) which is
        /// expected to be the current element of the passed parser.
        /// </summary>
        /// <param name="parser">The parser whose current element is the startup sequence element to be parsed.</param>
        internal void ParseStartupProgram(XmlParser parser)
        {
            // Read the contents of the Startup Sequence element.
            string serializedStartupSequence = parser.ReadToEndOfCurrentElement();

            // Convert the serialized information to byte[] for xml parsing.
            byte[] bytes = Encoding.UTF8.GetBytes(serializedStartupSequence);

            // Use a sax parser to parse each task task definition ID in the startup sequence block.
            TaskDefinitionIdTableSaxHandler handler = new TaskDefinitionIdTableSaxHandler(HandleTaskDefinitionId);

            handler.parse(bytes);
        }
Пример #2
0
 /// <summary>
 /// Creates and starts a SAX parser with this handler as the SAX handler, to parse
 /// a task definition ID table.
 /// </summary>
 /// <param name="newTaskDefintionIdHandler">A handler that will be called for each parsed entry.</param>
 /// <param name="xmlSerializedTaskDefinitionsTable">The XML serialized data.</param>
 public TaskInfoTableSaxHandler(TaskInfoHandler newTaskDefintionIdHandler)
 {
     _newTaskDefinitionIdHandler = newTaskDefintionIdHandler;
     childHandler = new TaskDefinitionIdTableSaxHandler(SetTaskDefinitionId);
 }