/// <summary> /// Processes the pipeline. /// </summary> protected override void ProcessRecord() { object result = null; // ? if (!CheckAndPrepareInput(this)) { return; } // 20131014 //this.WriteVerbose(this, _control.Current); // 20131014 //this.WriteVerbose(this, // (_control.GetSupportedPatterns()).Length.ToString()); // 20131109 //foreach (System.Windows.Automation.AutomationElement element in this.InputObject) { // 20131113 foreach (classic.AutomationPattern p in InputObject.SelectMany(element => element.GetSupportedPatterns())) { WriteVerbose(this, p.ProgrammaticName); } /* * foreach (IUiElement element in this.InputObject) { * foreach (System.Windows.Automation.AutomationPattern p in element.GetSupportedPatterns()) * { * this.WriteVerbose(this, p.ProgrammaticName); * } * } */ // 20131014 //foreach (System.Windows.Automation.AutomationPattern p in _control.GetSupportedPatterns()) /* * foreach (AutomationPattern p in this.InputObject.SelectMany(element => element.GetSupportedPatterns())) * { * this.WriteVerbose(this, p.ProgrammaticName); * } */ /* * foreach (System.Windows.Automation.AutomationElement element in this.InputObject) { * foreach (System.Windows.Automation.AutomationPattern p in element.GetSupportedPatterns()) * { * this.WriteVerbose(this, p.ProgrammaticName); * } * } */ classic.AutomationPattern pattern = UiaHelper.GetPatternByName(Name); // 20131209 result = UiaHelper.GetCurrentPattern(ref _control, pattern); // result = // _control.GetCurrentPattern(pattern); WriteVerbose(this, result); WriteObject(this, result); }