コード例 #1
0
        public ICssProperties WithStyle(string styleName, ICssStyleValue value)
        {
            if (string.IsNullOrWhiteSpace(styleName))
            {
                throw new ArgumentNullException(nameof(styleName));
            }

            if (value is null)
            {
                throw new ArgumentNullException(nameof(value));
            }

            styles.Add(new CssStyle {
                Name = styleName, Value = value
            });

            return(this);
        }
コード例 #2
0
        ICssProperties ICssProperties.WithStyle(string name, ICssStyleValue value)
        {
            properties.WithStyle(name, value);

            return(this);
        }