You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/codeql.yml
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ on:
12
12
- cron: '0 0 1,15 * *'
13
13
14
14
env:
15
-
NET_VERSION: '7.x'
15
+
NET_VERSION: '9.x'
16
16
17
17
jobs:
18
18
analyze:
@@ -41,10 +41,10 @@ jobs:
41
41
with:
42
42
dotnet-version: ${{ env.NET_VERSION }}
43
43
dotnet-quality: 'ga'
44
-
44
+
45
45
# Initializes the CodeQL tools for scanning.
46
46
- name: Initialize CodeQL
47
-
uses: github/codeql-action/init@v2
47
+
uses: github/codeql-action/init@v3
48
48
with:
49
49
languages: ${{ matrix.language }}
50
50
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -53,11 +53,11 @@ jobs:
53
53
54
54
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
55
55
# queries: security-extended,security-and-quality
56
-
56
+
57
57
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
58
58
# If this step fails, then you should remove it and run the build manually (see below)
59
59
- name: Autobuild
60
-
uses: github/codeql-action/autobuild@v2
60
+
uses: github/codeql-action/autobuild@v3
61
61
62
62
# ?? Command-line programs to run using the OS shell.
63
63
# ?? See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -60,9 +40,6 @@ public class PeopleEndpoints : MinimalHelpers.Routing.IEndpointRouteHandlerBuild
60
40
}
61
41
```
62
42
63
-
> **Note**
64
-
Starting from .NET 7.0, the `IEndpointRouteHandlerBuilder` interface exposes the `MapEndpoints` method as static abstract, so it can be called without creating an instance of the handler.
65
-
66
43
Call the `MapEndpoints()` extension method on the **WebApplication** object inside *Program.cs* before the `Run()` method invocation:
67
44
68
45
```csharp
@@ -94,9 +71,7 @@ app.MapEndpoints(type =>
94
71
> **Note**
95
72
These methods rely on Reflection to scan the Assembly and find the classes that implement the `IEndpointRouteHandlerBuilder` interface. This can have a performance impact, especially in large projects. If you have performance issues, consider using the explicit registration method. Moreover, this solution is incompatibile with Native AOT.
96
73
97
-
If you're working with .NET 7.0 or higher, the reccommended approach is to use the **MinimalHelpers.Routing.Analyzers** package, that provides a Source Generator for endpoints registration, as described later.
98
-
99
-
## MinimalHelpers.Routing.Analyzers (.NET 7.0 or higher)
0 commit comments