UIAutomation.ContextMenuSearcher.OnStartHook C# (CSharp) Method

OnStartHook() public method

public OnStartHook ( ) : void
return void
        public override void OnStartHook()
        {
            var data = SearcherData as ContextMenuSearcherData;
            
            conditionsForContextMenuSearch =
                new classic.AndCondition(
                    new classic.PropertyCondition(
                        classic.AutomationElement.ProcessIdProperty,
                        data.ProcessId),
                    new classic.PropertyCondition(
                        classic.AutomationElement.ControlTypeProperty,
                        classic.ControlType.Menu));
            
            ResultCollection = new List<IUiElement>();
        }