1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
6
namespace ICSharpCode.NRefactory.VB.Ast
9
/// Get/Set/AddHandler/RemoveHandler/RaiseEvent
11
public class Accessor : AttributedNode
13
public static readonly new Accessor Null = new NullAccessor ();
14
sealed class NullAccessor : Accessor
16
public override bool IsNull {
22
public override S AcceptVisitor<T, S> (IAstVisitor<T, S> visitor, T data)
28
public BlockStatement Body {
29
get { return GetChildByRole(Roles.Body); }
30
set { SetChildByRole(Roles.Body, value); }
33
public AstNodeCollection<ParameterDeclaration> Parameters {
34
get { return GetChildrenByRole(Roles.Parameter); }
37
public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)
39
return visitor.VisitAccessor(this, data);
42
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
44
Accessor o = other as Accessor;
45
return o != null && !o.IsNull && this.MatchAttributesAndModifiers(o, match) &&
46
this.Body.DoMatch(o.Body, match) && Parameters.DoMatch(o.Parameters, match);