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; }
}
}