using System; using System.Collections.Generic; namespace AspClassic.Parser; /// /// A read-only collection of attributes. /// public sealed class AttributeCollection : CommaDelimitedTreeCollection { private readonly Location _RightBracketLocation; /// /// The location of the '}'. /// public Location RightBracketLocation => _RightBracketLocation; /// /// Constructs a new collection of attributes. /// /// The attributes in the collection. /// The location of the commas in the list. /// The location of the right bracket. /// The location of the parse tree. public AttributeCollection(IList attributes, IList commaLocations, Location rightBracketLocation, Span span) : base(TreeType.AttributeCollection, attributes, commaLocations, span) { if (attributes == null || attributes.Count == 0) { throw new ArgumentException("AttributeCollection cannot be empty."); } _RightBracketLocation = rightBracketLocation; } }