public async Task<IEnumerable<IModelNode>> GetVertices(string solutionPath, CancellationToken cancellationToken)
{
var projectVertices = await _knownVertices.GetOrAdd(
solutionPath,
async path =>
{
var evaluationResults = (await _codeErrorRepository.GetErrors(solutionPath, cancellationToken).ConfigureAwait(false)).AsArray();
var projectMetrics = (await _metricsRepository.Get(solutionPath).ConfigureAwait(false)).AsArray();
var vertices = projectMetrics.Select(projectMetric => CreateProjectNode(projectMetric, projectMetrics, evaluationResults)).AsArray();
return vertices;
}).ConfigureAwait(false);
return cancellationToken.IsCancellationRequested
? Enumerable.Empty<IModelNode>()
: projectVertices;
}