25 lines
815 B
C#
25 lines
815 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace AspClassic.Parser;
|
|
|
|
/// <summary>
|
|
/// A read-only collection of imports.
|
|
/// </summary>
|
|
public sealed class ImportCollection : CommaDelimitedTreeCollection<Import>
|
|
{
|
|
/// <summary>
|
|
/// Constructs a collection of imports.
|
|
/// </summary>
|
|
/// <param name="importMembers">The imports in the collection.</param>
|
|
/// <param name="commaLocations">The location of the commas.</param>
|
|
/// <param name="span">The location of the parse tree.</param>
|
|
public ImportCollection(IList<Import> importMembers, IList<Location> commaLocations, Span span)
|
|
: base(TreeType.ImportCollection, importMembers, commaLocations, span)
|
|
{
|
|
if (importMembers == null || importMembers.Count == 0)
|
|
{
|
|
throw new ArgumentException("ImportCollection cannot be empty.");
|
|
}
|
|
}
|
|
}
|