@@ -369,35 +369,12 @@ private bool CheckAllMatch(List<Criteria> criteriaList)
369369 {
370370 foreach ( var c in criteriaList )
371371 {
372- if ( c is Contains ) // other criteria might be added such as NoLessThan and NoMoreThan.
373- {
374- if ( CheckContains ( c , true ) == false ) return false ;
375- }
376- if ( c is NotContains )
377- {
378- if ( CheckContains ( c , false ) == false ) return false ;
379- }
372+ var result = c . IsMatch ( ) ;
373+ AppendToLog ( $ "Check: { result } : '{ c . Property } ' { c . GetType ( ) . Name } '{ c . Value } '") ;
374+ if ( ! result ) return false ;
380375 }
381376 return true ;
382377 }
383-
384- /// <summary>
385- /// Returns true if a match is found and sense = true. For NotContains, use sense = false.
386- /// </summary>
387- /// <param name="criteria"></param>
388- /// <param name="sense"></param>
389- /// <returns></returns>
390- private bool CheckContains ( Criteria criteria , bool sense )
391- {
392- // If Property was a parameter, then use the expansion
393- var content = ParameterDictionary . ContainsKey ( criteria . Property )
394- ? ParameterDictionary [ criteria . Property ]
395- : criteria . Property ;
396-
397- var result = content . IndexOf ( criteria . Value , StringComparison . OrdinalIgnoreCase ) > - 1 == sense ;
398- LogCheckContains ( criteria . Value , sense , content , result ) ;
399- return result ;
400- }
401378 #endregion
402379
403380 private void AddItemToPage ( NotificationPage page , Item item )
@@ -668,7 +645,7 @@ public void ChangePage(int step)
668645 }
669646
670647 #region Logging
671- public void LogOverrideParameters ( )
648+ void LogOverrideParameters ( )
672649 {
673650 if ( Log == false ) return ;
674651
@@ -680,7 +657,7 @@ public void LogOverrideParameters()
680657 }
681658 }
682659
683- public void LogParameters ( )
660+ void LogParameters ( )
684661 {
685662 if ( Log == false ) return ;
686663
@@ -692,18 +669,12 @@ public void LogParameters()
692669 }
693670 }
694671
695- public void LogNotification ( Notification n )
672+ void LogNotification ( Notification n )
696673 {
697674 AppendToLog ( $ "\r \n Notification: { n . Title } ") ;
698675 }
699676
700- public void LogCheckContains ( string value , bool sense , string content , bool result )
701- {
702- var negation = sense ? "" : "NOT " ;
703- AppendToLog ( $ "Check: { result } = '{ value } ' { negation } contained in '{ content } '") ;
704- }
705-
706- public void AppendToLog ( string record )
677+ void AppendToLog ( string record )
707678 {
708679 if ( Log == false ) return ;
709680
0 commit comments