public NavInitCallLocationInfoProvider(ITextBuffer sourceBuffer, NavInitCallAnnotation callAnnotation): base(sourceBuffer) { _callAnnotation = callAnnotation; }
static IEnumerable<NavInitCallAnnotation> ReadInitCallAnnotation( SemanticModel semanticModel, NavTaskAnnotation navTaskAnnotation, IEnumerable<InvocationExpressionSyntax> invocationExpressions) { if (semanticModel == null || navTaskAnnotation == null) { yield break; } foreach (var invocationExpression in invocationExpressions) { var identifier = invocationExpression.Expression as IdentifierNameSyntax; if (identifier == null) { continue; } var methodSymbol = semanticModel.GetSymbolInfo(identifier).Symbol as IMethodSymbol; if (methodSymbol == null) { continue; } var declaringMethodNode = methodSymbol.DeclaringSyntaxReferences.FirstOrDefault()?.GetSyntax(); var navInitCallTag = ReadNavTags(declaringMethodNode).FirstOrDefault(tag => tag.TagName == AnnotationTagNames.NavInitCall); if (navInitCallTag == null) { continue; } var callAnnotation = new NavInitCallAnnotation( taskAnnotation : navTaskAnnotation, identifier : identifier, beginItfFullyQualifiedName: navInitCallTag.Content, parameter : ToComparableParameterTypeList(methodSymbol.Parameters)); yield return callAnnotation; } }