/// <summary> /// Add the array of attributes which name and value defines by internal array[2] only if <paramref name="condition"/> - <c>true</c>. /// </summary> /// <param name="tag"><see cref="TagWrapper"/></param> /// <param name="condition">Condition, which define will be added content or not </param> /// <param name="data">Array of array[2] - key/value pair</param> /// <returns>Changed <see cref="TagWrapper"/></returns> public static TagWrapper AddAttributesIf(this TagWrapper tag, bool condition, string[][] data) { if (condition) { tag.AddAttributes(data); } return(tag); }