예제 #1
0
        private EventRule FindOrCreateEventRule(string inPattern)
        {
            foreach (var rule in m_EventRules)
            {
                if (rule.Id() == inPattern)
                {
                    return(rule);
                }
            }

            EventRule newRule = new EventRule(inPattern);

            m_EventRules.Add(newRule);
            return(newRule);
        }
예제 #2
0
        private ReplaceRule FindOrCreateReplaceRule(string inPattern)
        {
            foreach (var rule in m_ReplaceRules)
            {
                if (rule.Id() == inPattern)
                {
                    return(rule);
                }
            }

            ReplaceRule newRule = new ReplaceRule(inPattern);

            m_ReplaceRules.Add(newRule);
            return(newRule);
        }