/// <summary> /// Return the one of your direct children which is or is a parent of the given child hookup /// (or null if no such exists). /// </summary> internal Hookup ChildContaining(Hookup child) { if (child.ParentHookup == this) { return(child); } return((from hookup in child.Parents where hookup.ParentHookup == this select hookup).FirstOrDefault()); }
/// <summary> /// Return the one of your direct children which is or is a parent of the given child hookup /// (or null if no such exists). /// </summary> internal Hookup ChildContaining(Hookup child) { if (child.ParentHookup == this) return child; return (from hookup in child.Parents where hookup.ParentHookup == this select hookup).FirstOrDefault(); }
/// <summary> /// An entry point for making a selection, setting the current position to the specified hookup. /// </summary> public static SelectionBuilder In(Hookup startHookup) { return new SelectionBuilder() {AnchorHookup = startHookup}; }