Skip to content

Commit 8a8eec8

Browse files
committed
Update RDG baselines
1 parent 8dd6a94 commit 8a8eec8

File tree

51 files changed

+851
-9
lines changed

Some content is hidden

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

51 files changed

+851
-9
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,22 @@ namespace Microsoft.AspNetCore.Http.Generated
225225

226226
}
227227

228+
file sealed class ApiEndpointMetadata : IApiEndpointMetadata
229+
{
230+
public static readonly ApiEndpointMetadata Instance = new();
231+
232+
private ApiEndpointMetadata()
233+
{
234+
}
235+
236+
public static void AddApiEndpointMetadataIfMissing(EndpointBuilder builder)
237+
{
238+
if (!builder.Metadata.Any(m => m is IApiEndpointMetadata))
239+
{
240+
builder.Metadata.Add(Instance);
241+
}
242+
}
243+
}
228244
%GENERATEDCODEATTRIBUTE%
229245
file static class GeneratedMetadataConstants
230246
{

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,22 @@ namespace Microsoft.AspNetCore.Http.Generated
363363

364364
}
365365

366+
file sealed class ApiEndpointMetadata : IApiEndpointMetadata
367+
{
368+
public static readonly ApiEndpointMetadata Instance = new();
369+
370+
private ApiEndpointMetadata()
371+
{
372+
}
373+
374+
public static void AddApiEndpointMetadataIfMissing(EndpointBuilder builder)
375+
{
376+
if (!builder.Metadata.Any(m => m is IApiEndpointMetadata))
377+
{
378+
builder.Metadata.Add(Instance);
379+
}
380+
}
381+
}
366382
%GENERATEDCODEATTRIBUTE%
367383
file static class GeneratedMetadataConstants
368384
{

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2225,6 +2225,22 @@ namespace Microsoft.AspNetCore.Http.Generated
22252225

22262226
}
22272227

2228+
file sealed class ApiEndpointMetadata : IApiEndpointMetadata
2229+
{
2230+
public static readonly ApiEndpointMetadata Instance = new();
2231+
2232+
private ApiEndpointMetadata()
2233+
{
2234+
}
2235+
2236+
public static void AddApiEndpointMetadataIfMissing(EndpointBuilder builder)
2237+
{
2238+
if (!builder.Metadata.Any(m => m is IApiEndpointMetadata))
2239+
{
2240+
builder.Metadata.Add(Instance);
2241+
}
2242+
}
2243+
}
22282244
%GENERATEDCODEATTRIBUTE%
22292245
file static class GeneratedMetadataConstants
22302246
{

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,22 @@ namespace Microsoft.AspNetCore.Http.Generated
412412

413413
}
414414

415+
file sealed class ApiEndpointMetadata : IApiEndpointMetadata
416+
{
417+
public static readonly ApiEndpointMetadata Instance = new();
418+
419+
private ApiEndpointMetadata()
420+
{
421+
}
422+
423+
public static void AddApiEndpointMetadataIfMissing(EndpointBuilder builder)
424+
{
425+
if (!builder.Metadata.Any(m => m is IApiEndpointMetadata))
426+
{
427+
builder.Metadata.Add(Instance);
428+
}
429+
}
430+
}
415431
%GENERATEDCODEATTRIBUTE%
416432
file static class GeneratedMetadataConstants
417433
{

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ namespace Microsoft.AspNetCore.Http.Generated
7272
var parameters = methodInfo.GetParameters();
7373
options.EndpointBuilder.Metadata.Add(new ParameterBindingMetadata("p", parameters[0], hasTryParse: true, hasBindAsync: false, isOptional: false));
7474
options.EndpointBuilder.Metadata.Add(new ProducesResponseTypeMetadata(statusCode: StatusCodes.Status200OK, type: typeof(global::System.Int32), contentTypes: GeneratedMetadataConstants.JsonContentType));
75+
ApiEndpointMetadata.AddApiEndpointMetadataIfMissing(options.EndpointBuilder);
7576
return new RequestDelegateMetadataResult { EndpointMetadata = options.EndpointBuilder.Metadata.AsReadOnly() };
7677
};
7778
RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
@@ -259,6 +260,22 @@ namespace Microsoft.AspNetCore.Http.Generated
259260

260261
}
261262

263+
file sealed class ApiEndpointMetadata : IApiEndpointMetadata
264+
{
265+
public static readonly ApiEndpointMetadata Instance = new();
266+
267+
private ApiEndpointMetadata()
268+
{
269+
}
270+
271+
public static void AddApiEndpointMetadataIfMissing(EndpointBuilder builder)
272+
{
273+
if (!builder.Metadata.Any(m => m is IApiEndpointMetadata))
274+
{
275+
builder.Metadata.Add(Instance);
276+
}
277+
}
278+
}
262279
%GENERATEDCODEATTRIBUTE%
263280
file static class GeneratedMetadataConstants
264281
{

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ namespace Microsoft.AspNetCore.Http.Generated
7272
var parameters = methodInfo.GetParameters();
7373
options.EndpointBuilder.Metadata.Add(new ParameterBindingMetadata("p", parameters[0], hasTryParse: false, hasBindAsync: false, isOptional: false));
7474
options.EndpointBuilder.Metadata.Add(new ProducesResponseTypeMetadata(statusCode: StatusCodes.Status200OK, type: typeof(global::System.Int32), contentTypes: GeneratedMetadataConstants.JsonContentType));
75+
ApiEndpointMetadata.AddApiEndpointMetadataIfMissing(options.EndpointBuilder);
7576
return new RequestDelegateMetadataResult { EndpointMetadata = options.EndpointBuilder.Metadata.AsReadOnly() };
7677
};
7778
RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
@@ -231,6 +232,22 @@ namespace Microsoft.AspNetCore.Http.Generated
231232

232233
}
233234

235+
file sealed class ApiEndpointMetadata : IApiEndpointMetadata
236+
{
237+
public static readonly ApiEndpointMetadata Instance = new();
238+
239+
private ApiEndpointMetadata()
240+
{
241+
}
242+
243+
public static void AddApiEndpointMetadataIfMissing(EndpointBuilder builder)
244+
{
245+
if (!builder.Metadata.Any(m => m is IApiEndpointMetadata))
246+
{
247+
builder.Metadata.Add(Instance);
248+
}
249+
}
250+
}
234251
%GENERATEDCODEATTRIBUTE%
235252
file static class GeneratedMetadataConstants
236253
{

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ namespace Microsoft.AspNetCore.Http.Generated
7272
var parameters = methodInfo.GetParameters();
7373
options.EndpointBuilder.Metadata.Add(new ParameterBindingMetadata("p", parameters[0], hasTryParse: false, hasBindAsync: false, isOptional: false));
7474
options.EndpointBuilder.Metadata.Add(new ProducesResponseTypeMetadata(statusCode: StatusCodes.Status200OK, type: typeof(global::System.Int32), contentTypes: GeneratedMetadataConstants.JsonContentType));
75+
ApiEndpointMetadata.AddApiEndpointMetadataIfMissing(options.EndpointBuilder);
7576
return new RequestDelegateMetadataResult { EndpointMetadata = options.EndpointBuilder.Metadata.AsReadOnly() };
7677
};
7778
RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
@@ -231,6 +232,22 @@ namespace Microsoft.AspNetCore.Http.Generated
231232

232233
}
233234

235+
file sealed class ApiEndpointMetadata : IApiEndpointMetadata
236+
{
237+
public static readonly ApiEndpointMetadata Instance = new();
238+
239+
private ApiEndpointMetadata()
240+
{
241+
}
242+
243+
public static void AddApiEndpointMetadataIfMissing(EndpointBuilder builder)
244+
{
245+
if (!builder.Metadata.Any(m => m is IApiEndpointMetadata))
246+
{
247+
builder.Metadata.Add(Instance);
248+
}
249+
}
250+
}
234251
%GENERATEDCODEATTRIBUTE%
235252
file static class GeneratedMetadataConstants
236253
{

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ namespace Microsoft.AspNetCore.Http.Generated
7272
var parameters = methodInfo.GetParameters();
7373
options.EndpointBuilder.Metadata.Add(new ParameterBindingMetadata("p", parameters[0], hasTryParse: true, hasBindAsync: false, isOptional: false));
7474
options.EndpointBuilder.Metadata.Add(new ProducesResponseTypeMetadata(statusCode: StatusCodes.Status200OK, type: typeof(global::System.Int32), contentTypes: GeneratedMetadataConstants.JsonContentType));
75+
ApiEndpointMetadata.AddApiEndpointMetadataIfMissing(options.EndpointBuilder);
7576
return new RequestDelegateMetadataResult { EndpointMetadata = options.EndpointBuilder.Metadata.AsReadOnly() };
7677
};
7778
RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
@@ -259,6 +260,22 @@ namespace Microsoft.AspNetCore.Http.Generated
259260

260261
}
261262

263+
file sealed class ApiEndpointMetadata : IApiEndpointMetadata
264+
{
265+
public static readonly ApiEndpointMetadata Instance = new();
266+
267+
private ApiEndpointMetadata()
268+
{
269+
}
270+
271+
public static void AddApiEndpointMetadataIfMissing(EndpointBuilder builder)
272+
{
273+
if (!builder.Metadata.Any(m => m is IApiEndpointMetadata))
274+
{
275+
builder.Metadata.Add(Instance);
276+
}
277+
}
278+
}
262279
%GENERATEDCODEATTRIBUTE%
263280
file static class GeneratedMetadataConstants
264281
{

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ namespace Microsoft.AspNetCore.Http.Generated
7272
var parameters = methodInfo.GetParameters();
7373
options.EndpointBuilder.Metadata.Add(new ParameterBindingMetadata("p", parameters[0], hasTryParse: true, hasBindAsync: false, isOptional: true));
7474
options.EndpointBuilder.Metadata.Add(new ProducesResponseTypeMetadata(statusCode: StatusCodes.Status200OK, type: typeof(global::System.Int32[]), contentTypes: GeneratedMetadataConstants.JsonContentType));
75+
ApiEndpointMetadata.AddApiEndpointMetadataIfMissing(options.EndpointBuilder);
7576
return new RequestDelegateMetadataResult { EndpointMetadata = options.EndpointBuilder.Metadata.AsReadOnly() };
7677
};
7778
RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
@@ -259,6 +260,22 @@ namespace Microsoft.AspNetCore.Http.Generated
259260

260261
}
261262

263+
file sealed class ApiEndpointMetadata : IApiEndpointMetadata
264+
{
265+
public static readonly ApiEndpointMetadata Instance = new();
266+
267+
private ApiEndpointMetadata()
268+
{
269+
}
270+
271+
public static void AddApiEndpointMetadataIfMissing(EndpointBuilder builder)
272+
{
273+
if (!builder.Metadata.Any(m => m is IApiEndpointMetadata))
274+
{
275+
builder.Metadata.Add(Instance);
276+
}
277+
}
278+
}
262279
%GENERATEDCODEATTRIBUTE%
263280
file static class GeneratedMetadataConstants
264281
{

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ namespace Microsoft.AspNetCore.Http.Generated
7272
var parameters = methodInfo.GetParameters();
7373
options.EndpointBuilder.Metadata.Add(new ParameterBindingMetadata("p", parameters[0], hasTryParse: true, hasBindAsync: false, isOptional: true));
7474
options.EndpointBuilder.Metadata.Add(new ProducesResponseTypeMetadata(statusCode: StatusCodes.Status200OK, type: typeof(global::System.Int32[]), contentTypes: GeneratedMetadataConstants.JsonContentType));
75+
ApiEndpointMetadata.AddApiEndpointMetadataIfMissing(options.EndpointBuilder);
7576
return new RequestDelegateMetadataResult { EndpointMetadata = options.EndpointBuilder.Metadata.AsReadOnly() };
7677
};
7778
RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
@@ -259,6 +260,22 @@ namespace Microsoft.AspNetCore.Http.Generated
259260

260261
}
261262

263+
file sealed class ApiEndpointMetadata : IApiEndpointMetadata
264+
{
265+
public static readonly ApiEndpointMetadata Instance = new();
266+
267+
private ApiEndpointMetadata()
268+
{
269+
}
270+
271+
public static void AddApiEndpointMetadataIfMissing(EndpointBuilder builder)
272+
{
273+
if (!builder.Metadata.Any(m => m is IApiEndpointMetadata))
274+
{
275+
builder.Metadata.Add(Instance);
276+
}
277+
}
278+
}
262279
%GENERATEDCODEATTRIBUTE%
263280
file static class GeneratedMetadataConstants
264281
{

0 commit comments

Comments
 (0)