Exemplo n.º 1
0
        public void Write(IStyleSystem styleSystem, XContainer container, ICondition condition, IConditionWriter childWriter)
        {
            var a = (AndCondition)condition;

            childWriter.Write(styleSystem, container, a.First, childWriter);
            childWriter.Write(styleSystem, container, a.Second, childWriter);
        }
Exemplo n.º 2
0
        public void Write(IStyleSystem styleSystem, XContainer container, ICondition condition, IConditionWriter childWriter)
        {
            var n          = (NotCondition)condition;
            var notElement = new XElement("not");

            childWriter.Write(styleSystem, notElement, n.Condition, childWriter);
            container.Add(notElement);
        }
Exemplo n.º 3
0
        public void Write(IStyleSystem styleSystem, XContainer container, ICondition condition, IConditionWriter childWriter)
        {
            var a = (OrCondition)condition;

            if (container.NodeType == XmlNodeType.Element)
            {
                var e = (XElement)container;
                if (e.Name == "or")
                {
                    childWriter.Write(styleSystem, e, a.First, childWriter);
                    childWriter.Write(styleSystem, e, a.Second, childWriter);
                    return;
                }
            }

            var orElement = new XElement("or");

            childWriter.Write(styleSystem, orElement, a.First, childWriter);
            childWriter.Write(styleSystem, orElement, a.Second, childWriter);
            container.Add(orElement);
        }