progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
34
AspClassic.Parser/AttributeCollection.cs
Normal file
34
AspClassic.Parser/AttributeCollection.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AspClassic.Parser;
|
||||
|
||||
/// <summary>
|
||||
/// A read-only collection of attributes.
|
||||
/// </summary>
|
||||
public sealed class AttributeCollection : CommaDelimitedTreeCollection<Attribute>
|
||||
{
|
||||
private readonly Location _RightBracketLocation;
|
||||
|
||||
/// <summary>
|
||||
/// The location of the '}'.
|
||||
/// </summary>
|
||||
public Location RightBracketLocation => _RightBracketLocation;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new collection of attributes.
|
||||
/// </summary>
|
||||
/// <param name="attributes">The attributes in the collection.</param>
|
||||
/// <param name="commaLocations">The location of the commas in the list.</param>
|
||||
/// <param name="rightBracketLocation">The location of the right bracket.</param>
|
||||
/// <param name="span">The location of the parse tree.</param>
|
||||
public AttributeCollection(IList<Attribute> attributes, IList<Location> 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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue