protected override bool IsEligible( ISelector leftSelector, IHtmlElement element ) { var restrict = leftSelector as ContainerRestrict; if ( restrict != null ) return restrict.RestrictContainer.Nodes().Contains( element ); return leftSelector.IsEligibleBuffered( element.Parent() ); }
protected override bool IsEligible(ISelector leftSelector, IHtmlElement element) { var restrict = leftSelector as ContainerRestrict; if (restrict != null) { return(restrict.RestrictContainer.Nodes().Contains(element)); } return(leftSelector.IsEligibleBuffered(element.Parent())); }
protected override bool IsEligible(ISelector leftSelector, IHtmlElement element) { var restrict = leftSelector as ContainerRestrict; if (restrict != null) { return(element.IsDescendantOf(restrict.RestrictContainer)); } var parant = element.Parent(); //如果父级元素符合左选择器,或者父级元素符合本选择器。 return(leftSelector.IsEligibleBuffered(parant) || this.IsEligibleBuffered(parant)); }
protected override bool IsEligible(ISelector leftSelector, IHtmlElement element) { var previous = element.PreviousElement(); return(leftSelector.IsEligibleBuffered(previous) || this.IsEligibleBuffered(previous)); }
protected override bool IsEligible(ISelector leftSelector, IHtmlElement element) { return(leftSelector.IsEligibleBuffered(element.PreviousElement())); }
protected override bool IsEligible( ISelector leftSelector, IHtmlElement element ) { var previous = element.PreviousElement(); return leftSelector.IsEligibleBuffered( previous ) || this.IsEligibleBuffered( previous ); }
protected override bool IsEligible( ISelector leftSelector, IHtmlElement element ) { return leftSelector.IsEligibleBuffered( element.PreviousElement() ); }
protected override bool IsEligible( ISelector leftSelector, IHtmlElement element ) { var restrict = leftSelector as ContainerRestrict; if ( restrict != null ) return element.IsDescendantOf( restrict.RestrictContainer ); var parant = element.Parent(); //如果父级元素符合左选择器,或者父级元素符合本选择器。 return leftSelector.IsEligibleBuffered( parant ) || this.IsEligibleBuffered( parant ); }