コード例 #1
0
        internal CssClassList(CssBuilderOptions options)
        {
            _cssClasses = new List <string>();
            _options    = options ?? throw new ArgumentNullException(nameof(options));
            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.");
            }

            _cache = options.GetCache();
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CssBuilderOptions"/> class.
 /// </summary>
 public CssBuilderOptions()
 {
     _cache = new ThreadsafeCssBuilderCache();
 }