Beispiel #1
0
 /// <summary>
 /// Adds the specified <see cref="CssClass"/> that satisfied by specify condition.
 /// </summary>
 /// <param name="condition">if set to <c>true</c> to add the <see cref="CssClass"/> instance.</param>
 /// <param name="cssClass">The <see cref="CssClass"/> instance.</param>
 public Css Add(bool condition, CssClass cssClass)
 {
     if (condition)
     {
         _cssBuilder.Add(cssClass.ToString());
     }
     return(this);
 }
Beispiel #2
0
        /// <summary>
        /// Adds the specified <see cref="CssClass"/> instance.
        /// </summary>
        /// <param name="cssClass">The <see cref="CssClass"/> instance.</param>
        /// <exception cref="System.ArgumentNullException">cssClass</exception>
        public Css Add(CssClass cssClass)
        {
            if (cssClass is null)
            {
                throw new System.ArgumentNullException(nameof(cssClass));
            }

            return(Add(true, cssClass));
        }