Exemplo n.º 1
0
		static public bool ValidateSimpleRules(string rules, out string message)
		{
			SimpleCollationRuleParser ruleParser = new SimpleCollationRuleParser();
			if (!ruleParser.ValidateSimpleCollationRules(rules, out message))
			{
				return false;
			}
			try
			{
				new SimpleRulesCollator(rules);
			}
			catch (Exception e)
			{
				message = String.Format("Invalid simple rules: {0}", e.Message);
				return false;
			}
			return true;
		}
Exemplo n.º 2
0
        static public bool ValidateSimpleRules(string rules, out string message)
        {
            SimpleCollationRuleParser ruleParser = new SimpleCollationRuleParser();

            if (!ruleParser.ValidateSimpleCollationRules(rules, out message))
            {
                return(false);
            }
            try
            {
                new SimpleRulesCollator(rules);
            }
            catch (Exception e)
            {
                message = String.Format("Invalid simple rules: {0}", e.Message);
                return(false);
            }
            return(true);
        }
Exemplo n.º 3
0
		static public string ConvertToIcuRules(string rules)
		{
			SimpleCollationRuleParser ruleConverter = new SimpleCollationRuleParser();
			return ruleConverter.ConvertToIcuTailoringRule(rules);
		}
Exemplo n.º 4
0
        static public string ConvertToIcuRules(string rules)
        {
            SimpleCollationRuleParser ruleConverter = new SimpleCollationRuleParser();

            return(ruleConverter.ConvertToIcuTailoringRule(rules));
        }