Esempio n. 1
0
        public EntityTemplate(XmlNode xmlNode, ILanguage[] languages)
        {
            Languages = languages;

            Priority  = int.Parse(xmlNode.Attributes["Priority"].Value);
            MainRegex = new EntityRegex(xmlNode.Attributes["Pattern"].Value);

            Handlers = BaseHandlerManager.SplitHandlers(xmlNode);
        }
Esempio n. 2
0
        public EntityTemplate(XmlNode xmlNode, ILanguage[] languages, int defaultPriority, int defaultFirstIndex)
        {
            Languages = languages;

            if (xmlNode.Attributes["Priority"] != null)
            {
                Priority = int.Parse(xmlNode.Attributes["Priority"].Value);
            }
            else
            {
                Priority = defaultPriority;
            }
            MainRegex = new EntityRegex(xmlNode.Attributes["Pattern"].Value);

            Handlers = BaseHandlerManager.SplitHandlers(xmlNode);
        }