protected override void VisitValueExpression( XElement element, XAttribute attribute, MSBuildLanguageElement resolvedElement, MSBuildLanguageAttribute resolvedAttribute, ValueInfo info, MSBuildValueKind kind, ExpressionNode node) { foreach (var n in node.WithAllDescendants()) { switch (n) { case ExpressionFunctionName func: if (func.Parent is ExpressionPropertyFunctionInvocation inv) { string baseName = MSBuildPropertyFunctionReferenceCollector.StripGetPrefix(func.Name); if (IsMatch(baseName) && inv.Target is ExpressionClassReference cn && cn.Name == className) { Results.Add((func.Offset, func.Length, ReferenceUsage.Read)); } } break; } } }
public MSBuildStaticPropertyFunctionReferenceCollector(string className, string functionName) : base(MSBuildPropertyFunctionReferenceCollector.StripGetPrefix(functionName)) { this.className = className; }