Ejemplo n.º 1
0
        public void Execute(StringBuilder sb, string value)
        {
            string[]      properties = value.Split('/');
            StringBuilder key        = new StringBuilder();

            string[] items = RuleAnalysis.Execute(properties[0]);
            foreach (string p in items)
            {
                string[]          sps     = RuleAnalysis.GetProperties(p);
                IParameterHandler handler = null;
                if (Factory.Handlers.TryGetValue(sps[0], out handler))
                {
                    handler.Execute(key, sps[1]);
                }
            }

            SequenceItem item = GetSequenceItem(key.ToString());

            lock (item)
            {
                item.Value++;
                sb.Append(item.Value.ToString(properties[1]));
            }
            Save(item);
        }
Ejemplo n.º 2
0
        public string Create(string rule)
        {
            string[]      items = RuleAnalysis.Execute(rule);
            StringBuilder sb    = new StringBuilder();

            foreach (string item in items)
            {
                string[]          properties = RuleAnalysis.GetProperties(item);
                IParameterHandler handler    = null;
                if (mHandlers.TryGetValue(properties[0], out handler))
                {
                    handler.Execute(sb, properties[1]);
                }
            }
            return(sb.ToString());
        }