8 internal sealed
class EvaluateManagedBackingFieldsWalker
11 internal EvaluateManagedBackingFieldsWalker(SyntaxNode node, SemanticModel model, IFieldSymbol fieldSymbol)
13 (FieldSymbol, Model) = (fieldSymbol, model);
17 public override void VisitInvocationExpression(InvocationExpressionSyntax node)
19 var invocationSymbol = Model.GetSymbolInfo(node).Symbol as IMethodSymbol;
21 if (invocationSymbol.IsPropertyInfoManagementMethod())
23 foreach (var argument
in node.ArgumentList.Arguments)
25 var argumentSymbol = Model.GetSymbolInfo(argument.Expression).Symbol;
26 UsesField = argumentSymbol !=
null && Equals(argumentSymbol, FieldSymbol);
31 private SemanticModel Model {
get; }
32 private IFieldSymbol FieldSymbol {
get; }
33 public bool UsesField {
get;
private set; }