예제 #1
0
        internal override String SerializeValue(IEnumerable <CssProperty> properties)
        {
            if (!IsComplete(properties))
            {
                return(String.Empty);
            }

            var values = new List <String>();
            var width  = _leftWidth.SerializeValue();
            var style  = _leftStyle.SerializeValue();
            var color  = _leftColor.SerializeValue();

            if (width == _topWidth.SerializeValue() && width == _bottomWidth.SerializeValue() && width == _rightWidth.SerializeValue())
            {
                values.Add(width);
            }

            if (style == _topStyle.SerializeValue() && style == _bottomStyle.SerializeValue() && style == _rightStyle.SerializeValue())
            {
                values.Add(style);
            }

            if (color == _topColor.SerializeValue() && color == _bottomColor.SerializeValue() && color == _rightColor.SerializeValue())
            {
                values.Add(color);
            }

            return(String.Join(" ", values));
        }
예제 #2
0
        internal override String SerializeValue(IEnumerable <CssProperty> properties)
        {
            if (!IsComplete(properties))
            {
                return(String.Empty);
            }

            return(String.Format("{0} {1} {2}", _width.SerializeValue(), _style.SerializeValue(), _color.SerializeValue()));
        }