/// <summary> /// Initializes a new instance of the <see cref="SyntaxVisitingEventArgs"/> class. /// </summary> /// <param name="syntaxTreeElement">The syntax tree element instance. If null, the "empty" <c>SyntaxTreeElement</c> is /// used.</param> /// <param name="state">The visiting state, that is, the location where the event is raised.</param> public SyntaxVisitingEventArgs(SyntaxTreeElement syntaxTreeElement, SyntaxVisitingState state) { SyntaxTreeElement = syntaxTreeElement ?? SyntaxTreeElement.Empty; State = state; }
/// <summary> /// Initializes a new instance of the <see cref="SyntaxVisitingEventArgs"/> class. /// </summary> /// <param name="syntaxItem">The syntax item; either a syntax node, token or trivia. The object is used to construct /// a <see cref="SyntaxTreeElement"/> having the underlying syntax item. If <c>syntaxItem</c> is not one of these types, /// the "empty" <c>SyntaxTreeElement</c> is created.</param> /// <param name="state">An value of the <see cref="SyntaxVisitingState"/> enumeration that describes the location /// where the event is raised.</param> public SyntaxVisitingEventArgs(object syntaxItem, SyntaxVisitingState state) : this(SyntaxTreeElement.Create(syntaxItem), state) { }