/// <summary> /// Reads a single template definition. /// </summary> /// <returns></returns> public NodeTemplate ReadTemplateDefinition() { NodeTemplateType type = (NodeTemplateType)Reader.ReadByte(); if (!TemplateParsers.ContainsKey(type)) { throw new InvalidDataException("Unknown node template type."); } return(TemplateParsers[type](this)); }
/// <summary> /// Writes the given template type to the output stream. /// </summary> /// <param name="Type"></param> public void WriteTemplateType(NodeTemplateType Type) { Writer.Write((byte)Type); }