示例#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
文件: CssWriter.cs 项目: carbon/Css
        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
文件: CssRoot.cs 项目: carbon/Css
        public void RemoveChild(CssNode node)
        {
            node.Parent = null;

            children.Remove(node);
        }
示例#6
0
文件: CssRoot.cs 项目: carbon/Css
        public void InsertChild(int index, CssNode node)
        {
            node.Parent = this;

            children.Insert(index, node);
        }
示例#7
0
文件: CssRoot.cs 项目: carbon/Css
        public void AddChild(CssNode node)
        {
            node.Parent = this;

            children.Add(node);
        }
示例#8
0
文件: CssNode.cs 项目: carbon/Css
        public CssNode(NodeKind kind, CssNode parent = null)
        {
            Kind = kind;

            this.parent = parent;
        }