Exemple #1
0
        protected virtual SyntaxBase ReplacePropertyAccessSyntax(PropertyAccessSyntax syntax)
        {
            var hasChanges = TryRewrite(syntax.BaseExpression, out var baseExpression);

            hasChanges |= TryRewriteStrict(syntax.Dot, out var dot);
            hasChanges |= TryRewriteStrict(syntax.PropertyName, out var propertyName);

            if (!hasChanges)
            {
                return(syntax);
            }

            return(new PropertyAccessSyntax(baseExpression, dot, propertyName));
        }
Exemple #2
0
 void ISyntaxVisitor.VisitPropertyAccessSyntax(PropertyAccessSyntax syntax) => ReplaceCurrent(syntax, ReplacePropertyAccessSyntax);
Exemple #3
0
 public virtual void VisitPropertyAccessSyntax(PropertyAccessSyntax syntax)
 {
     this.Visit(syntax.BaseExpression);
     this.Visit(syntax.Dot);
     this.Visit(syntax.PropertyName);
 }