using System; using System.Collections.Generic; namespace AspClassic.Parser; /// /// A read-only collection of declarations. /// public sealed class DeclarationCollection : ColonDelimitedTreeCollection { /// /// Constructs a new collection of declarations. /// /// The declarations in the collection. /// The locations of the colons in the collection. /// The location of the parse tree. public DeclarationCollection(IList declarations, IList colonLocations, Span span) : base(TreeType.DeclarationCollection, declarations, colonLocations, span) { if ((declarations == null || declarations.Count == 0) && (colonLocations == null || colonLocations.Count == 0)) { throw new ArgumentException("DeclarationCollection cannot be empty."); } } }