internal CssClassList(CssBuilderOptions options, ThreadsafeCssBuilderCache cache)
        {
            _cssClasses = new List <string>();
            _options    = options ?? throw new ArgumentNullException(nameof(options));
            _cache      = cache ?? throw new ArgumentNullException(nameof(cache));

            if (_options.EnumToClassNameConverter == null)
            {
                throw new ArgumentException("Options.EnumToClassNameConverter can't be null.");
            }

            if (_options.PropertyToClassNameConverter == null)
            {
                throw new ArgumentException("Options.PropertyToClassNameConverter can't be null.");
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="CssBuilder"/> class.
 /// </summary>
 /// <param name="options">An options object which modifies class name generation and other things.</param>
 /// <exception cref="ArgumentNullException">options is null.</exception>
 public CssBuilder(CssBuilderOptions options)
 {
     _options      = options ?? throw new ArgumentNullException(nameof(options));
     _defaultCache = _caches.GetOrAdd(_options, CreateCacheForOptions);
 }