private async Task <IReadOnlyDictionary <StatementBase, IValidationModel> > BuildValidationModelsAsync(StatementCollection statements, string statementText, CancellationToken cancellationToken) { var dictionary = new Dictionary <StatementBase, IValidationModel>(); foreach (var statement in statements) { var semanticModel = await _validator.BuildSemanticModelAsync(statementText, statement, _databaseModel, cancellationToken); var validationModel = _validator.BuildValidationModel(semanticModel); dictionary.Add(statement, validationModel); } return(dictionary.AsReadOnly()); }