using System.Collections.Generic; namespace AspClassic.Parser; /// /// A parse tree for a custom event declaration. /// public sealed class CustomEventDeclaration : SignatureDeclaration { private readonly Location _CustomLocation; private readonly NameCollection _ImplementsList; private readonly DeclarationCollection _Accessors; private readonly EndBlockDeclaration _EndDeclaration; /// /// The location of the 'Custom' keyword. /// public Location CustomLocation => _CustomLocation; /// /// The list of implemented members. /// public NameCollection ImplementsList => _ImplementsList; /// /// The event accessors. /// public DeclarationCollection Accessors => _Accessors; /// /// The End Event declaration, if any. /// public EndBlockDeclaration EndDeclaration => _EndDeclaration; /// /// Constructs a new parse tree for a custom property declaration. /// /// The attributes on the declaration. /// The modifiers on the declaration. /// The location of the 'Custom' keyword. /// The location of the keyword. /// The name of the custom event. /// The location of the 'As', if any. /// The result type, if any. /// The implements list. /// The custom event accessors. /// The End Event declaration, if any. /// The location of the parse tree. /// The comments for the parse tree. public CustomEventDeclaration(AttributeBlockCollection attributes, ModifierCollection modifiers, Location customLocation, Location keywordLocation, SimpleName name, Location asLocation, TypeName resultType, NameCollection implementsList, DeclarationCollection accessors, EndBlockDeclaration endDeclaration, Span span, IList comments) : base(TreeType.CustomEventDeclaration, attributes, modifiers, keywordLocation, name, null, null, asLocation, null, resultType, span, comments) { SetParent(accessors); SetParent(endDeclaration); SetParent(implementsList); _CustomLocation = customLocation; _ImplementsList = implementsList; _Accessors = accessors; _EndDeclaration = endDeclaration; } protected override void GetChildTrees(IList childList) { base.GetChildTrees(childList); Tree.AddChild(childList, ImplementsList); Tree.AddChild(childList, Accessors); Tree.AddChild(childList, EndDeclaration); } }