public TreeWalker(Condition condition) { // This is an unusual situation - a direct constructor. // We have to go create the native tree walker, which might throw. Utility.ValidateArgumentNonNull(condition, "condition"); try { this._obj = Automation.Factory.CreateTreeWalker(condition.NativeCondition); } catch (System.Runtime.InteropServices.COMException e) { Exception newEx; if (Utility.ConvertException(e, out newEx)) { throw newEx; } else { throw; } } }
internal TreeWalker Wrap(UIAutomationClient.IUIAutomationTreeWalker obj) { return((obj == null) ? null : Wrap(obj)); }
internal TreeWalker(UIAutomationClient.IUIAutomationTreeWalker obj) { Debug.Assert(obj != null); _obj = obj; }