Exemplo n.º 1
0
		public static StyleProperty ParseTree(BaseTree tree)
		{
			var property = new StyleProperty {Name = ((BaseTree) tree.Children[0]).Text};

			for(var i=1; i<tree.ChildCount;i++)
			{
				var node = tree.GetChild(i);
				if(node.Text == "EXPR")
				{
					property.Values.Add(StyleExpression.ParseExpression(node.GetChild(0)));
				}
				else
				{
					property.Values.Add(new LiteralExpression(node.Text));
				}
			}

			return property;
		}
Exemplo n.º 2
0
		public bool Equals(StyleProperty obj)
		{
			if (ReferenceEquals(null, obj)) return false;
			if (ReferenceEquals(this, obj)) return true;
			return Equals(obj.Name, Name) && obj.Values.SequenceEqual(Values);
		}