public virtual MessageTemplate CreateTemplateFromMessage(Message templateDef, TemplateRegistry registry)
        {
            string name = templateDef.GetString("Name");

            Field[] fields = GroupConverter.ParseFieldInstructions(templateDef, registry, initialContext);
            return(new MessageTemplate(name, fields));
        }
        public override Message CreateTemplateDefinitionMessage(MessageTemplate messageTemplate)
        {
            Message templateDefinition = GroupConverter.Convert(messageTemplate, new Message(TEMPLATE_DEFINITION), initialContext);
            int     reset = messageTemplate.HasAttribute(RESET_PROPERTY)?1:0;

            templateDefinition.SetInteger("Reset", reset);
            return(templateDefinition);
        }