private static async Task PrecalculateAdvancedInfoAsync(Document document, CancellationToken cancellationToken) { // we do not support precalculating opened file. if (document.IsOpen()) { return; } // we already have information. move on if (await SyntaxTreeIdentifierInfo.IdentifierSetPrecalculatedAsync(document, cancellationToken).ConfigureAwait(false)) { return; } await SyntaxTreeIdentifierInfo.SaveIdentifierSetAsync(document, cancellationToken).ConfigureAwait(false); }