void ProcessSimpleSelector(XElement style, ISimpleSelector selector) { if (selector is ConditionalSelector) { var cs = (ConditionalSelector)selector; var conditions = new XElement("conditions"); conditionWriter.Write(StyleSystem, conditions, cs.Condition, conditionWriter); style.Add(conditions); selector = cs.Selector; } if (selector is ElementSelector) { var es = (ElementSelector)selector; style.Add(new XAttribute("element", es.TypeName)); } }
public static DescendantSelector WithDirectChild(this IStyleSelector parentElement, ISimpleSelector innerChild) { return(new DescendantSelector(innerChild, parentElement, true)); }
public static ConditionalSelector WithCondition(this ISimpleSelector selector, ICondition condition) { return(new ConditionalSelector(selector, condition)); }
public ConditionalSelector(ISimpleSelector selector, ICondition condition) { Selector = selector; Condition = condition; }
public DescendantSelector(ISimpleSelector selector, IStyleSelector parentSelector, bool directChild = false) { DirectChild = directChild; Selector = selector; AnchestorSelector = parentSelector; }