IPrecompiledQueryCodeGenerator.GeneratePrecompiledQueries Method

Definition

Generates the precompiled queries code.

public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Scaffolding.ScaffoldedFile> GeneratePrecompiledQueries (Microsoft.CodeAnalysis.Compilation compilation, Microsoft.CodeAnalysis.Editing.SyntaxGenerator syntaxGenerator, Microsoft.EntityFrameworkCore.DbContext dbContext, System.Collections.Generic.IReadOnlyDictionary<System.Reflection.MemberInfo,Microsoft.EntityFrameworkCore.Design.Internal.QualifiedName> memberAccessReplacements, System.Collections.Generic.List<Microsoft.EntityFrameworkCore.Query.Internal.PrecompiledQueryCodeGenerator.QueryPrecompilationError> precompilationErrors, System.Collections.Generic.ISet<string> generatedFileNames, System.Reflection.Assembly? assembly = default, string? suffix = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GeneratePrecompiledQueries : Microsoft.CodeAnalysis.Compilation * Microsoft.CodeAnalysis.Editing.SyntaxGenerator * Microsoft.EntityFrameworkCore.DbContext * System.Collections.Generic.IReadOnlyDictionary<System.Reflection.MemberInfo, Microsoft.EntityFrameworkCore.Design.Internal.QualifiedName> * System.Collections.Generic.List<Microsoft.EntityFrameworkCore.Query.Internal.PrecompiledQueryCodeGenerator.QueryPrecompilationError> * System.Collections.Generic.ISet<string> * System.Reflection.Assembly * string * System.Threading.CancellationToken -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Scaffolding.ScaffoldedFile>
Public Function GeneratePrecompiledQueries (compilation As Compilation, syntaxGenerator As SyntaxGenerator, dbContext As DbContext, memberAccessReplacements As IReadOnlyDictionary(Of MemberInfo, QualifiedName), precompilationErrors As List(Of PrecompiledQueryCodeGenerator.QueryPrecompilationError), generatedFileNames As ISet(Of String), Optional assembly As Assembly = Nothing, Optional suffix As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IReadOnlyList(Of ScaffoldedFile)

Parameters

compilation
Compilation

The compilation.

syntaxGenerator
SyntaxGenerator

The syntax generator.

dbContext
DbContext

The context.

memberAccessReplacements
IReadOnlyDictionary<MemberInfo,Microsoft.EntityFrameworkCore.Design.Internal.QualifiedName>

The member access replacements.

precompilationErrors
List<Microsoft.EntityFrameworkCore.Query.Internal.PrecompiledQueryCodeGenerator.QueryPrecompilationError>

A list that will contain precompilation errors.

generatedFileNames
ISet<String>

The set of file names generated so far.

assembly
Assembly

The assembly corresponding to the provided compilation.

suffix
String

The suffix to attach to the name of all the generated files.

cancellationToken
CancellationToken

The cancellation token.

Returns

The files containing precompiled queries code.

Applies to