Example #1
0
 /// <summary>
 /// checks if the rule with the same name is in the cache,
 /// if it is, it returns the original object, if its not
 /// it creates a new one, and caches it
 /// </summary>
 /// <param name="ruleName">
 /// the name of the rule which we're looking for
 /// </param>
 /// <returns>
 /// cached rule
 /// </returns>
 public static Rule GetCachedRule(string ruleName)
 {
     return(Rules.SingleOrDefault(x => x.NameCleaned() == ruleName));;
 }