Skip to content

Commit a136e78

Browse files
Do not emit unused fields in RDG source
Do not emit unused private fields for HTTP verbs that are not used by any of the user-code endpoints. Resolves #48381.
1 parent 62af2d7 commit a136e78

File tree

41 files changed

+60
-181
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

+60
-181
lines changed

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

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.Collections.Immutable;
45
using System.Globalization;
56
using System.IO;
67
using System.Linq;
78
using System.Text;
89
using Microsoft.AspNetCore.Analyzers.Infrastructure;
910
using Microsoft.AspNetCore.App.Analyzers.Infrastructure;
10-
using Microsoft.CodeAnalysis;
11-
using Microsoft.CodeAnalysis.Operations;
12-
using Microsoft.AspNetCore.Http.RequestDelegateGenerator.StaticRouteHandlerModel.Emitters;
1311
using Microsoft.AspNetCore.Http.RequestDelegateGenerator.StaticRouteHandlerModel;
12+
using Microsoft.AspNetCore.Http.RequestDelegateGenerator.StaticRouteHandlerModel.Emitters;
13+
using Microsoft.CodeAnalysis;
1414
using Microsoft.CodeAnalysis.CSharp;
15+
using Microsoft.CodeAnalysis.Operations;
1516

1617
namespace Microsoft.AspNetCore.Http.RequestDelegateGenerator;
1718

@@ -122,7 +123,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
122123
.Collect()
123124
.Select((endpoints, _) =>
124125
{
125-
var dedupedByDelegate = endpoints.Distinct<Endpoint>(EndpointDelegateComparer.Instance);
126+
var dedupedByDelegate = endpoints.Distinct(EndpointDelegateComparer.Instance);
126127
using var stringWriter = new StringWriter(CultureInfo.InvariantCulture);
127128
using var codeWriter = new CodeWriter(stringWriter, baseIndent: 2);
128129
foreach (var endpoint in dedupedByDelegate)
@@ -166,7 +167,12 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
166167
codeWriter.EndBlock();
167168
}
168169

169-
return stringWriter.ToString();
170+
var verbs = endpoints
171+
.Select(endpoint => endpoint.EmitterContext.HttpMethod!)
172+
.Where(verb => verb is not null)
173+
.ToImmutableHashSet();
174+
175+
return (stringWriter.ToString(), verbs);
170176
});
171177

172178
var endpointHelpers = endpoints
@@ -264,7 +270,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
264270

265271
context.RegisterSourceOutput(thunksAndEndpoints, (context, sources) =>
266272
{
267-
var (((thunks, endpointsCode), helperMethods), helperTypes) = sources;
273+
var (((thunks, (endpointsCode, verbs)), helperMethods), helperTypes) = sources;
268274

269275
if (thunks.IsDefaultOrEmpty || string.IsNullOrEmpty(endpointsCode))
270276
{
@@ -282,7 +288,8 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
282288
thunks: thunksCode.ToString(),
283289
endpoints: endpointsCode,
284290
helperMethods: helperMethods ?? string.Empty,
285-
helperTypes: helperTypes ?? string.Empty);
291+
helperTypes: helperTypes ?? string.Empty,
292+
verbs: verbs);
286293

287294
context.AddSource("GeneratedRouteBuilderExtensions.g.cs", code);
288295
});

src/Http/Http.Extensions/gen/RequestDelegateGeneratorSources.cs

+33-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.Collections.Immutable;
5+
using System.Linq;
6+
using System.Text;
47
using Microsoft.CodeAnalysis.CSharp;
58
namespace Microsoft.AspNetCore.Http.RequestDelegateGenerator;
69

@@ -436,7 +439,7 @@ public override bool IsDefined(Type attributeType, bool inherit)
436439
}
437440
""";
438441

439-
public static string GetGeneratedRouteBuilderExtensionsSource(string genericThunks, string thunks, string endpoints, string helperMethods, string helperTypes) => $$"""
442+
public static string GetGeneratedRouteBuilderExtensionsSource(string genericThunks, string thunks, string endpoints, string helperMethods, string helperTypes, ImmutableHashSet<string> verbs) => $$"""
440443
{{SourceHeader}}
441444
442445
namespace Microsoft.AspNetCore.Builder
@@ -454,7 +457,7 @@ public SourceKey(string path, int line)
454457
}
455458
}
456459
457-
{{GetEndpoints(endpoints)}}
460+
{{GetEndpoints(endpoints, verbs)}}
458461
}
459462
460463
namespace Microsoft.AspNetCore.Http.Generated
@@ -595,7 +598,15 @@ internal static RouteHandlerBuilder MapCore(
595598
}
596599
""" : string.Empty;
597600

598-
private static string GetEndpoints(string endpoints) => endpoints != string.Empty ? $$"""
601+
private static string GetEndpoints(string endpoints, ImmutableHashSet<string> verbs)
602+
{
603+
if (endpoints == string.Empty)
604+
{
605+
return string.Empty;
606+
}
607+
608+
var builder = new StringBuilder();
609+
builder.Append($$"""
599610
// This class needs to be internal so that the compiled application
600611
// has access to the strongly-typed endpoint definitions that are
601612
// generated by the compiler so that they will be favored by
@@ -604,13 +615,26 @@ private static string GetEndpoints(string endpoints) => endpoints != string.Empt
604615
{{GeneratedCodeAttribute}}
605616
internal static class GenerateRouteBuilderEndpoints
606617
{
607-
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
608-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
609-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
610-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
611-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
612618
619+
""");
620+
621+
foreach (string verb in verbs.OrderBy(p => p, System.StringComparer.Ordinal))
622+
{
623+
builder.AppendLine($$"""
624+
private static readonly string[] {{verb}}Verb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.{{verb}} };
625+
""");
626+
}
627+
628+
if (verbs.Count > 0)
629+
{
630+
builder.AppendLine();
631+
}
632+
633+
builder.Append($$"""
613634
{{endpoints}}
614635
}
615-
""" : string.Empty;
636+
""");
637+
638+
return builder.ToString();
639+
}
616640
}

src/Http/Http.Extensions/gen/StaticRouteHandlerModel/Emitters/EmitterContext.cs

+1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ internal sealed class EmitterContext
1616
public bool HasEndpointMetadataProvider { get; set; }
1717
public bool HasEndpointParameterMetadataProvider { get; set; }
1818
public bool HasResponseMetadata { get; set; }
19+
public string? HttpMethod { get; set; }
1920
}

src/Http/Http.Extensions/gen/StaticRouteHandlerModel/StaticRouteHandlerModel.Emitter.cs

+12-10
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,20 @@ public static string EmitSourceKey(this Endpoint endpoint)
3636

3737
public static string EmitVerb(this Endpoint endpoint)
3838
{
39-
return endpoint.HttpMethod switch
40-
{
41-
"MapGet" => "GetVerb",
42-
"MapPut" => "PutVerb",
43-
"MapPost" => "PostVerb",
44-
"MapDelete" => "DeleteVerb",
45-
"MapPatch" => "PatchVerb",
46-
"MapMethods" => "httpMethods",
47-
"Map" => "null",
48-
"MapFallback" => "null",
39+
(var verbSymbol, endpoint.EmitterContext.HttpMethod) = endpoint.HttpMethod switch
40+
{
41+
"MapGet" => ("GetVerb", "Get"),
42+
"MapPut" => ("PutVerb", "Put"),
43+
"MapPost" => ("PostVerb", "Post"),
44+
"MapDelete" => ("DeleteVerb", "Delete"),
45+
"MapPatch" => ("PatchVerb", "Patch"),
46+
"MapMethods" => ("httpMethods", null),
47+
"Map" => ("null", null),
48+
"MapFallback" => ("null", null),
4949
_ => throw new ArgumentException($"Received unexpected HTTP method: {endpoint.HttpMethod}")
5050
};
51+
52+
return verbSymbol;
5153
}
5254

5355
/*

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

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Microsoft.AspNetCore.Builder
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
3434
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
35-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

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

-4
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ namespace Microsoft.AspNetCore.Builder
3131
%GENERATEDCODEATTRIBUTE%
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
34-
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
3534
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapPost(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

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

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Microsoft.AspNetCore.Builder
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
3434
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
35-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

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

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Microsoft.AspNetCore.Builder
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
3434
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
35-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

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

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Microsoft.AspNetCore.Builder
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
3434
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
35-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

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

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Microsoft.AspNetCore.Builder
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
3434
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
35-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

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

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Microsoft.AspNetCore.Builder
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
3434
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
35-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

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

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Microsoft.AspNetCore.Builder
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
3434
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
35-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

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

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Microsoft.AspNetCore.Builder
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
3434
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
35-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

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

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Microsoft.AspNetCore.Builder
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
3434
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
35-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

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

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Microsoft.AspNetCore.Builder
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
3434
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
35-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

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

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Microsoft.AspNetCore.Builder
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
3434
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
35-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

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

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Microsoft.AspNetCore.Builder
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
3434
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
35-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

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

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Microsoft.AspNetCore.Builder
3232
internal static class GenerateRouteBuilderEndpoints
3333
{
3434
private static readonly string[] GetVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Get };
35-
private static readonly string[] PostVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Post };
36-
private static readonly string[] PutVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Put };
37-
private static readonly string[] DeleteVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Delete };
38-
private static readonly string[] PatchVerb = new[] { global::Microsoft.AspNetCore.Http.HttpMethods.Patch };
3935

4036
internal static global::Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet(
4137
this global::Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints,

0 commit comments

Comments
 (0)