public async Task <MethodPerformanceInfo> GetMethodPerformanceInfoAsync(IMethodSymbol methodSymbol) { var documentationCommentId = methodSymbol.GetDocumentationCommentId(); if (_methodPerformancInfoCache.TryGetValue(documentationCommentId, out var existingMethodPerformanceInfo)) { return(existingMethodPerformanceInfo); } // TODO RR: Use SyntaxAnnotation https://joshvarty.wordpress.com/2015/09/18/learn-roslyn-now-part-13-keeping-track-of-syntax-nodes-with-syntax-annotations/ // TODO RR: Do one Dictionary per Class/File var methodTelemetry = await _telemetryProvider.GetTelemetryDataAsync(documentationCommentId).ConfigureAwait(false); if (methodTelemetry == null) { return(null); } var performanceInfo = new MethodPerformanceInfo(_predictionEngine, methodSymbol, methodTelemetry); _methodPerformancInfoCache.Add(documentationCommentId, performanceInfo); return(performanceInfo); }