Пример #1
0
        public void InsertChild(int index, CssNode node)
        {
            node.Parent = this;

            children.Insert(index, node);
        }
Пример #2
0
        public void RemoveChild(CssNode node)
        {
            node.Parent = null;

            children.Remove(node);
        }
Пример #3
0
        public void AddChild(CssNode node)
        {
            node.Parent = this;

            children.Add(node);
        }
Пример #4
0
        public void WriteValue(CssNode value)
        {
            if (nodeCount > 50000) throw new Exception("Greater then 50000 nodes written");

            nodeCount++;

            switch (value.Kind)
            {
                case NodeKind.Variable   : WriteVariable((CssVariable)value); break;
                case NodeKind.ValueList  : WriteValueList((CssValueList)value); break;
                case NodeKind.Function   : WriteFunction((CssFunction)value); break;
                case NodeKind.Expression : WriteValue(EvalulateExpression((CssValue)value)); break;
                default                  : writer.Write(value.ToString()); break;
            }
        }
Пример #5
0
        public void RemoveChild(CssNode node)
        {
            node.Parent = null;

            children.Remove(node);
        }
Пример #6
0
        public void InsertChild(int index, CssNode node)
        {
            node.Parent = this;

            children.Insert(index, node);
        }
Пример #7
0
        public void AddChild(CssNode node)
        {
            node.Parent = this;

            children.Add(node);
        }
Пример #8
0
        public CssNode(NodeKind kind, CssNode parent = null)
        {
            Kind = kind;

            this.parent = parent;
        }