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); }
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); }