Beispiel #1
0
        public IPropertyValue Construct(Property[] properties)
        {
            var result = properties.Guard <OptionsValue>();

            if (result == null)
            {
                var values = new IPropertyValue[_converters.Length];

                for (var i = 0; i < _converters.Length; i++)
                {
                    var value = _converters[i].Construct(properties);

                    if (value == null)
                    {
                        return(null);
                    }

                    values[i] = value;
                }

                result = new OptionsValue(values, Enumerable.Empty <Token>());
            }

            return(result);
        }
        public IPropertyValue Construct(CssProperty[] properties)
        {
            var result = properties.Guard<OptionsValue>();

            if (result == null)
            {
                var values = new IPropertyValue[_converters.Length];

                for (var i = 0; i < _converters.Length; i++)
                {
                    var value = _converters[i].Construct(properties);

                    if (value == null)
                        return null;

                    values[i] = value;
                }

                result = new OptionsValue(values, Enumerable.Empty<CssToken>());
            }

            return result;
        }