Skip to content

Commit 4997fc0

Browse files
committed
Add separator to method name and update same interceptor test
1 parent 7ac7fd7 commit 4997fc0

File tree

41 files changed

+81
-80
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+81
-80
lines changed

src/Http/Http.Extensions/gen/RequestDelegateGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
6262
{
6363
codeWriter.WriteLine($$"""[InterceptsLocation(@"{{location.File}}", {{location.LineNumber}}, {{location.CharacterNumber}})]""");
6464
}
65-
codeWriter.WriteLine($"internal static RouteHandlerBuilder {endpoint.HttpMethod}_{endpoint.Location.LineNumber}{endpoint.Location.CharacterNumber}(");
65+
codeWriter.WriteLine($"internal static RouteHandlerBuilder {endpoint.HttpMethod}_{endpoint.Location.LineNumber}_{endpoint.Location.CharacterNumber}(");
6666
codeWriter.Indent++;
6767
codeWriter.WriteLine("this IEndpointRouteBuilder endpoints,");
6868
// MapFallback overloads that only take a delegate do not need a pattern argument

src/Http/Http.Extensions/test/RequestDelegateGenerator/Baselines/MapAction_BindAsync_Snapshot.generated.txt

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace Microsoft.AspNetCore.Http.Generated
6161
private static readonly string[] PatchVerb = new[] { Microsoft.AspNetCore.Http.HttpMethods.Patch };
6262

6363
[InterceptsLocation(@"TestMapActions.cs", 25, 13)]
64-
internal static RouteHandlerBuilder MapGet_2513(
64+
internal static RouteHandlerBuilder MapGet_25_13(
6565
this IEndpointRouteBuilder endpoints,
6666
[StringSyntax("Route")] string pattern,
6767
Delegate handler)
@@ -178,7 +178,7 @@ namespace Microsoft.AspNetCore.Http.Generated
178178
}
179179

180180
[InterceptsLocation(@"TestMapActions.cs", 26, 5)]
181-
internal static RouteHandlerBuilder MapGet_265(
181+
internal static RouteHandlerBuilder MapGet_26_5(
182182
this IEndpointRouteBuilder endpoints,
183183
[StringSyntax("Route")] string pattern,
184184
Delegate handler)
@@ -273,7 +273,7 @@ namespace Microsoft.AspNetCore.Http.Generated
273273
}
274274

275275
[InterceptsLocation(@"TestMapActions.cs", 27, 5)]
276-
internal static RouteHandlerBuilder MapGet_275(
276+
internal static RouteHandlerBuilder MapGet_27_5(
277277
this IEndpointRouteBuilder endpoints,
278278
[StringSyntax("Route")] string pattern,
279279
Delegate handler)
@@ -390,7 +390,7 @@ namespace Microsoft.AspNetCore.Http.Generated
390390
}
391391

392392
[InterceptsLocation(@"TestMapActions.cs", 28, 5)]
393-
internal static RouteHandlerBuilder MapGet_285(
393+
internal static RouteHandlerBuilder MapGet_28_5(
394394
this IEndpointRouteBuilder endpoints,
395395
[StringSyntax("Route")] string pattern,
396396
Delegate handler)
@@ -485,7 +485,7 @@ namespace Microsoft.AspNetCore.Http.Generated
485485
}
486486

487487
[InterceptsLocation(@"TestMapActions.cs", 29, 5)]
488-
internal static RouteHandlerBuilder MapGet_295(
488+
internal static RouteHandlerBuilder MapGet_29_5(
489489
this IEndpointRouteBuilder endpoints,
490490
[StringSyntax("Route")] string pattern,
491491
Delegate handler)
@@ -602,7 +602,7 @@ namespace Microsoft.AspNetCore.Http.Generated
602602
}
603603

604604
[InterceptsLocation(@"TestMapActions.cs", 30, 5)]
605-
internal static RouteHandlerBuilder MapGet_305(
605+
internal static RouteHandlerBuilder MapGet_30_5(
606606
this IEndpointRouteBuilder endpoints,
607607
[StringSyntax("Route")] string pattern,
608608
Delegate handler)
@@ -697,7 +697,7 @@ namespace Microsoft.AspNetCore.Http.Generated
697697
}
698698

699699
[InterceptsLocation(@"TestMapActions.cs", 31, 5)]
700-
internal static RouteHandlerBuilder MapGet_315(
700+
internal static RouteHandlerBuilder MapGet_31_5(
701701
this IEndpointRouteBuilder endpoints,
702702
[StringSyntax("Route")] string pattern,
703703
Delegate handler)
@@ -814,7 +814,7 @@ namespace Microsoft.AspNetCore.Http.Generated
814814
}
815815

816816
[InterceptsLocation(@"TestMapActions.cs", 32, 5)]
817-
internal static RouteHandlerBuilder MapGet_325(
817+
internal static RouteHandlerBuilder MapGet_32_5(
818818
this IEndpointRouteBuilder endpoints,
819819
[StringSyntax("Route")] string pattern,
820820
Delegate handler)
@@ -909,7 +909,7 @@ namespace Microsoft.AspNetCore.Http.Generated
909909
}
910910

911911
[InterceptsLocation(@"TestMapActions.cs", 33, 5)]
912-
internal static RouteHandlerBuilder MapGet_335(
912+
internal static RouteHandlerBuilder MapGet_33_5(
913913
this IEndpointRouteBuilder endpoints,
914914
[StringSyntax("Route")] string pattern,
915915
Delegate handler)
@@ -1025,7 +1025,7 @@ namespace Microsoft.AspNetCore.Http.Generated
10251025
}
10261026

10271027
[InterceptsLocation(@"TestMapActions.cs", 34, 5)]
1028-
internal static RouteHandlerBuilder MapGet_345(
1028+
internal static RouteHandlerBuilder MapGet_34_5(
10291029
this IEndpointRouteBuilder endpoints,
10301030
[StringSyntax("Route")] string pattern,
10311031
Delegate handler)
@@ -1119,7 +1119,7 @@ namespace Microsoft.AspNetCore.Http.Generated
11191119
}
11201120

11211121
[InterceptsLocation(@"TestMapActions.cs", 35, 5)]
1122-
internal static RouteHandlerBuilder MapGet_355(
1122+
internal static RouteHandlerBuilder MapGet_35_5(
11231123
this IEndpointRouteBuilder endpoints,
11241124
[StringSyntax("Route")] string pattern,
11251125
Delegate handler)
@@ -1235,7 +1235,7 @@ namespace Microsoft.AspNetCore.Http.Generated
12351235
}
12361236

12371237
[InterceptsLocation(@"TestMapActions.cs", 36, 5)]
1238-
internal static RouteHandlerBuilder MapGet_365(
1238+
internal static RouteHandlerBuilder MapGet_36_5(
12391239
this IEndpointRouteBuilder endpoints,
12401240
[StringSyntax("Route")] string pattern,
12411241
Delegate handler)
@@ -1329,7 +1329,7 @@ namespace Microsoft.AspNetCore.Http.Generated
13291329
}
13301330

13311331
[InterceptsLocation(@"TestMapActions.cs", 37, 5)]
1332-
internal static RouteHandlerBuilder MapGet_375(
1332+
internal static RouteHandlerBuilder MapGet_37_5(
13331333
this IEndpointRouteBuilder endpoints,
13341334
[StringSyntax("Route")] string pattern,
13351335
Delegate handler)
@@ -1446,7 +1446,7 @@ namespace Microsoft.AspNetCore.Http.Generated
14461446
}
14471447

14481448
[InterceptsLocation(@"TestMapActions.cs", 38, 5)]
1449-
internal static RouteHandlerBuilder MapGet_385(
1449+
internal static RouteHandlerBuilder MapGet_38_5(
14501450
this IEndpointRouteBuilder endpoints,
14511451
[StringSyntax("Route")] string pattern,
14521452
Delegate handler)
@@ -1541,7 +1541,7 @@ namespace Microsoft.AspNetCore.Http.Generated
15411541
}
15421542

15431543
[InterceptsLocation(@"TestMapActions.cs", 39, 5)]
1544-
internal static RouteHandlerBuilder MapGet_395(
1544+
internal static RouteHandlerBuilder MapGet_39_5(
15451545
this IEndpointRouteBuilder endpoints,
15461546
[StringSyntax("Route")] string pattern,
15471547
Delegate handler)
@@ -1657,7 +1657,7 @@ namespace Microsoft.AspNetCore.Http.Generated
16571657
}
16581658

16591659
[InterceptsLocation(@"TestMapActions.cs", 40, 5)]
1660-
internal static RouteHandlerBuilder MapGet_405(
1660+
internal static RouteHandlerBuilder MapGet_40_5(
16611661
this IEndpointRouteBuilder endpoints,
16621662
[StringSyntax("Route")] string pattern,
16631663
Delegate handler)
@@ -1751,7 +1751,7 @@ namespace Microsoft.AspNetCore.Http.Generated
17511751
}
17521752

17531753
[InterceptsLocation(@"TestMapActions.cs", 41, 5)]
1754-
internal static RouteHandlerBuilder MapGet_415(
1754+
internal static RouteHandlerBuilder MapGet_41_5(
17551755
this IEndpointRouteBuilder endpoints,
17561756
[StringSyntax("Route")] string pattern,
17571757
Delegate handler)
@@ -1868,7 +1868,7 @@ namespace Microsoft.AspNetCore.Http.Generated
18681868
}
18691869

18701870
[InterceptsLocation(@"TestMapActions.cs", 42, 5)]
1871-
internal static RouteHandlerBuilder MapGet_425(
1871+
internal static RouteHandlerBuilder MapGet_42_5(
18721872
this IEndpointRouteBuilder endpoints,
18731873
[StringSyntax("Route")] string pattern,
18741874
Delegate handler)
@@ -1963,7 +1963,7 @@ namespace Microsoft.AspNetCore.Http.Generated
19631963
}
19641964

19651965
[InterceptsLocation(@"TestMapActions.cs", 43, 5)]
1966-
internal static RouteHandlerBuilder MapGet_435(
1966+
internal static RouteHandlerBuilder MapGet_43_5(
19671967
this IEndpointRouteBuilder endpoints,
19681968
[StringSyntax("Route")] string pattern,
19691969
Delegate handler)
@@ -2079,7 +2079,7 @@ namespace Microsoft.AspNetCore.Http.Generated
20792079
}
20802080

20812081
[InterceptsLocation(@"TestMapActions.cs", 44, 5)]
2082-
internal static RouteHandlerBuilder MapGet_445(
2082+
internal static RouteHandlerBuilder MapGet_44_5(
20832083
this IEndpointRouteBuilder endpoints,
20842084
[StringSyntax("Route")] string pattern,
20852085
Delegate handler)

src/Http/Http.Extensions/test/RequestDelegateGenerator/Baselines/MapAction_ExplicitBodyParam_ComplexReturn_Snapshot.generated.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace Microsoft.AspNetCore.Http.Generated
6161
private static readonly string[] PatchVerb = new[] { Microsoft.AspNetCore.Http.HttpMethods.Patch };
6262

6363
[InterceptsLocation(@"TestMapActions.cs", 25, 13)]
64-
internal static RouteHandlerBuilder MapPost_2513(
64+
internal static RouteHandlerBuilder MapPost_25_13(
6565
this IEndpointRouteBuilder endpoints,
6666
[StringSyntax("Route")] string pattern,
6767
Delegate handler)
@@ -159,7 +159,7 @@ namespace Microsoft.AspNetCore.Http.Generated
159159
}
160160

161161
[InterceptsLocation(@"TestMapActions.cs", 27, 5)]
162-
internal static RouteHandlerBuilder MapPost_275(
162+
internal static RouteHandlerBuilder MapPost_27_5(
163163
this IEndpointRouteBuilder endpoints,
164164
[StringSyntax("Route")] string pattern,
165165
Delegate handler)

src/Http/Http.Extensions/test/RequestDelegateGenerator/Baselines/MapAction_ExplicitHeader_ComplexTypeArrayParam.generated.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace Microsoft.AspNetCore.Http.Generated
6161
private static readonly string[] PatchVerb = new[] { Microsoft.AspNetCore.Http.HttpMethods.Patch };
6262

6363
[InterceptsLocation(@"TestMapActions.cs", 25, 13)]
64-
internal static RouteHandlerBuilder MapGet_2513(
64+
internal static RouteHandlerBuilder MapGet_25_13(
6565
this IEndpointRouteBuilder endpoints,
6666
[StringSyntax("Route")] string pattern,
6767
Delegate handler)

src/Http/Http.Extensions/test/RequestDelegateGenerator/Baselines/MapAction_ExplicitHeader_NullableStringArrayParam.generated.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace Microsoft.AspNetCore.Http.Generated
6161
private static readonly string[] PatchVerb = new[] { Microsoft.AspNetCore.Http.HttpMethods.Patch };
6262

6363
[InterceptsLocation(@"TestMapActions.cs", 25, 13)]
64-
internal static RouteHandlerBuilder MapGet_2513(
64+
internal static RouteHandlerBuilder MapGet_25_13(
6565
this IEndpointRouteBuilder endpoints,
6666
[StringSyntax("Route")] string pattern,
6767
Delegate handler)

src/Http/Http.Extensions/test/RequestDelegateGenerator/Baselines/MapAction_ExplicitHeader_StringArrayParam.generated.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace Microsoft.AspNetCore.Http.Generated
6161
private static readonly string[] PatchVerb = new[] { Microsoft.AspNetCore.Http.HttpMethods.Patch };
6262

6363
[InterceptsLocation(@"TestMapActions.cs", 25, 13)]
64-
internal static RouteHandlerBuilder MapGet_2513(
64+
internal static RouteHandlerBuilder MapGet_25_13(
6565
this IEndpointRouteBuilder endpoints,
6666
[StringSyntax("Route")] string pattern,
6767
Delegate handler)

src/Http/Http.Extensions/test/RequestDelegateGenerator/Baselines/MapAction_ExplicitQuery_ComplexTypeArrayParam.generated.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace Microsoft.AspNetCore.Http.Generated
6161
private static readonly string[] PatchVerb = new[] { Microsoft.AspNetCore.Http.HttpMethods.Patch };
6262

6363
[InterceptsLocation(@"TestMapActions.cs", 25, 13)]
64-
internal static RouteHandlerBuilder MapGet_2513(
64+
internal static RouteHandlerBuilder MapGet_25_13(
6565
this IEndpointRouteBuilder endpoints,
6666
[StringSyntax("Route")] string pattern,
6767
Delegate handler)

src/Http/Http.Extensions/test/RequestDelegateGenerator/Baselines/MapAction_ExplicitQuery_NullableStringArrayParam.generated.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace Microsoft.AspNetCore.Http.Generated
6161
private static readonly string[] PatchVerb = new[] { Microsoft.AspNetCore.Http.HttpMethods.Patch };
6262

6363
[InterceptsLocation(@"TestMapActions.cs", 25, 13)]
64-
internal static RouteHandlerBuilder MapGet_2513(
64+
internal static RouteHandlerBuilder MapGet_25_13(
6565
this IEndpointRouteBuilder endpoints,
6666
[StringSyntax("Route")] string pattern,
6767
Delegate handler)

src/Http/Http.Extensions/test/RequestDelegateGenerator/Baselines/MapAction_ExplicitQuery_StringArrayParam.generated.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace Microsoft.AspNetCore.Http.Generated
6161
private static readonly string[] PatchVerb = new[] { Microsoft.AspNetCore.Http.HttpMethods.Patch };
6262

6363
[InterceptsLocation(@"TestMapActions.cs", 25, 13)]
64-
internal static RouteHandlerBuilder MapGet_2513(
64+
internal static RouteHandlerBuilder MapGet_25_13(
6565
this IEndpointRouteBuilder endpoints,
6666
[StringSyntax("Route")] string pattern,
6767
Delegate handler)

src/Http/Http.Extensions/test/RequestDelegateGenerator/Baselines/MapAction_ExplicitServiceParam_SimpleReturn_Snapshot.generated.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace Microsoft.AspNetCore.Http.Generated
6161
private static readonly string[] PatchVerb = new[] { Microsoft.AspNetCore.Http.HttpMethods.Patch };
6262

6363
[InterceptsLocation(@"TestMapActions.cs", 25, 13)]
64-
internal static RouteHandlerBuilder MapGet_2513(
64+
internal static RouteHandlerBuilder MapGet_25_13(
6565
this IEndpointRouteBuilder endpoints,
6666
[StringSyntax("Route")] string pattern,
6767
Delegate handler)
@@ -155,7 +155,7 @@ namespace Microsoft.AspNetCore.Http.Generated
155155
}
156156

157157
[InterceptsLocation(@"TestMapActions.cs", 26, 5)]
158-
internal static RouteHandlerBuilder MapGet_265(
158+
internal static RouteHandlerBuilder MapGet_26_5(
159159
this IEndpointRouteBuilder endpoints,
160160
[StringSyntax("Route")] string pattern,
161161
Delegate handler)
@@ -249,7 +249,7 @@ namespace Microsoft.AspNetCore.Http.Generated
249249
}
250250

251251
[InterceptsLocation(@"TestMapActions.cs", 27, 5)]
252-
internal static RouteHandlerBuilder MapGet_275(
252+
internal static RouteHandlerBuilder MapGet_27_5(
253253
this IEndpointRouteBuilder endpoints,
254254
[StringSyntax("Route")] string pattern,
255255
Delegate handler)

0 commit comments

Comments
 (0)