using System; using System.Collections.Generic; namespace AspClassic.Parser; /// /// A parse tree for a RaiseEvent statement. /// public sealed class RaiseEventStatement : Statement { private readonly SimpleName _Name; private readonly ArgumentCollection _Arguments; /// /// The name of the event to raise. /// public SimpleName Name => _Name; /// /// The arguments to the event. /// public ArgumentCollection Arguments => _Arguments; /// /// Constructs a new parse tree for a RaiseEvents statement. /// /// The name of the event to raise. /// The arguments to the event. /// The location of the parse tree. /// The comments for the parse tree. public RaiseEventStatement(SimpleName name, ArgumentCollection arguments, Span span, IList comments) : base(TreeType.RaiseEventStatement, span, comments) { if (name == null) { throw new ArgumentNullException("name"); } SetParent(name); SetParent(arguments); _Name = name; _Arguments = arguments; } protected override void GetChildTrees(IList childList) { Tree.AddChild(childList, Name); Tree.AddChild(childList, Arguments); } }