@@ -7,18 +7,18 @@ namespace TestStack.White.AutomationElementSearch
77{
88 public class AutomationSearchCondition
99 {
10- private readonly List < Condition > conditions = new List < Condition > ( ) ;
11- private static readonly Dictionary < string , Func < AutomationElement . AutomationElementInformation , object , bool > > valueMatchers =
10+ static readonly Dictionary < string , Func < AutomationElement . AutomationElementInformation , object , bool > > ValueMatchers =
1211 new Dictionary < string , Func < AutomationElement . AutomationElementInformation , object , bool > > ( ) ;
12+ readonly List < Condition > conditions = new List < Condition > ( ) ;
1313
1414 static AutomationSearchCondition ( )
1515 {
16- valueMatchers [ AutomationElement . NameProperty . ProgrammaticName ] = ( information , value ) => information . Name . Equals ( value ) ;
17- valueMatchers [ AutomationElement . AutomationIdProperty . ProgrammaticName ] = ( information , value ) => information . AutomationId . Equals ( value ) ;
18- valueMatchers [ AutomationElement . ClassNameProperty . ProgrammaticName ] = ( information , value ) => information . ClassName . Equals ( value ) ;
19- valueMatchers [ AutomationElement . ProcessIdProperty . ProgrammaticName ] =
16+ ValueMatchers [ AutomationElement . NameProperty . ProgrammaticName ] = ( information , value ) => information . Name . Equals ( value ) ;
17+ ValueMatchers [ AutomationElement . AutomationIdProperty . ProgrammaticName ] = ( information , value ) => information . AutomationId . Equals ( value ) ;
18+ ValueMatchers [ AutomationElement . ClassNameProperty . ProgrammaticName ] = ( information , value ) => information . ClassName . Equals ( value ) ;
19+ ValueMatchers [ AutomationElement . ProcessIdProperty . ProgrammaticName ] =
2020 ( information , value ) => information . ProcessId . ToString ( ) . Equals ( value . ToString ( ) ) ;
21- valueMatchers [ AutomationElement . ControlTypeProperty . ProgrammaticName ] = ( information , value ) => information . ControlType . Id . Equals ( value ) ;
21+ ValueMatchers [ AutomationElement . ControlTypeProperty . ProgrammaticName ] = ( information , value ) => information . ControlType . Id . Equals ( value ) ;
2222 }
2323
2424 public AutomationSearchCondition ( Condition condition )
@@ -132,7 +132,7 @@ private bool Satisfies(AutomationElement element, Condition[] testConditions, bo
132132
133133 if ( condition is PropertyCondition )
134134 {
135- var match = valueMatchers [ ( ( PropertyCondition ) condition ) . Property . ProgrammaticName ] ( element . Current , ( ( PropertyCondition ) condition ) . Value ) ;
135+ var match = ValueMatchers [ ( ( PropertyCondition ) condition ) . Property . ProgrammaticName ] ( element . Current , ( ( PropertyCondition ) condition ) . Value ) ;
136136 if ( ! match && and ) return false ;
137137 if ( match && ! and ) return true ;
138138 }
0 commit comments