コード例 #1
0
        public static ISelector ToPool(this SelectorConstructor ctor)
        {
            var result = ctor.GetResult();

            lock (Lock)
            {
                Selector.Push(ctor);
            }

            return(result);
        }
コード例 #2
0
            public override ISelector Produce()
            {
                var valid = _selector.IsValid;
                var sel   = _selector.GetResult();

                if (valid)
                {
                    var code = PseudoClassNames.Matches.StylesheetFunction(sel.Text);
                    return(SimpleSelector.PseudoClass(/*el => sel.Match(el),*/ code));
                }
                return(null);
            }
コード例 #3
0
            public override ISelector Produce()
            {
                var valid = _selector.IsValid;
                var sel   = _selector.GetResult();

                if (valid)
                {
                    var code = PseudoClassNames.HostContext.StylesheetFunction(sel.Text);
                    return(SimpleSelector.PseudoClass(code));
                }
                return(null);
            }
コード例 #4
0
            public override ISelector Produce()
            {
                var valid = _nested.IsValid;
                var sel   = _nested.GetResult();

                if (valid)
                {
                    var code = PseudoClassNames.Has.StylesheetFunction(sel.Text);
                    return(SimpleSelector.PseudoClass(/*el => el.ChildNodes.QuerySelector(sel) != null,*/ code));
                }
                return(null);
            }