IEnumerable <T> Xml.Schema.Linq.IXTyped.Ancestors <T>() { for (XTypedElement i = this.getTypedParent(); i != null; i = i.getTypedParent()) { T t = (T)(i as T); if (t != null) { yield return(t); } } }
IEnumerable <T> IXTyped.Ancestors <T>() { XTypedElement parent = getTypedParent(); while (parent != null) { T parentT = parent as T; if (parentT != null) { yield return(parentT); } parent = parent.getTypedParent(); } }