-
Notifications
You must be signed in to change notification settings - Fork 10k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release/7.0] Add and use RDF.InferMetadata and update new PopulateMe…
…tadata API (#43543)
- Loading branch information
Showing
80 changed files
with
1,840 additions
and
1,472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/Http/Http.Abstractions/src/Metadata/IEndpointMetadataProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Reflection; | ||
using Microsoft.AspNetCore.Builder; | ||
|
||
namespace Microsoft.AspNetCore.Http.Metadata; | ||
|
||
/// <summary> | ||
/// Indicates that a type provides a static method that provides <see cref="Endpoint"/> metadata when declared as a parameter type or the | ||
/// returned type of an <see cref="Endpoint"/> route handler delegate. | ||
/// </summary> | ||
public interface IEndpointMetadataProvider | ||
{ | ||
/// <summary> | ||
/// Populates metadata for the related <see cref="Endpoint"/> and <see cref="MethodInfo"/>. | ||
/// </summary> | ||
/// <remarks> | ||
/// This method is called by RequestDelegateFactory when creating a <see cref="RequestDelegate"/> and by MVC when creating endpoints for controller actions. | ||
/// This is called for each parameter and return type of the route handler or action with a declared type implementing this interface. | ||
/// Add or remove objects on the <see cref="EndpointBuilder.Metadata"/> property of the <paramref name="builder"/> to modify the <see cref="Endpoint.Metadata"/> being built. | ||
/// </remarks> | ||
/// <param name="method">The <see cref="MethodInfo"/> of the route handler delegate or MVC Action of the endpoint being created.</param> | ||
/// <param name="builder">The <see cref="EndpointBuilder"/> used to construct the endpoint for the given <paramref name="method"/>.</param> | ||
static abstract void PopulateMetadata(MethodInfo method, EndpointBuilder builder); | ||
} |
26 changes: 26 additions & 0 deletions
26
src/Http/Http.Abstractions/src/Metadata/IEndpointParameterMetadataProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Reflection; | ||
using Microsoft.AspNetCore.Builder; | ||
|
||
namespace Microsoft.AspNetCore.Http.Metadata; | ||
|
||
/// <summary> | ||
/// Indicates that a type provides a static method that provides <see cref="Endpoint"/> metadata when declared as the | ||
/// parameter type of an <see cref="Endpoint"/> route handler delegate. | ||
/// </summary> | ||
public interface IEndpointParameterMetadataProvider | ||
{ | ||
/// <summary> | ||
/// Populates metadata for the related <see cref="Endpoint"/> and <see cref="ParameterInfo"/>. | ||
/// </summary> | ||
/// <remarks> | ||
/// This method is called by RequestDelegateFactory when creating a <see cref="RequestDelegate"/> and by MVC when creating endpoints for controller actions. | ||
/// This is called for each parameter of the route handler or action with a declared type implementing this interface. | ||
/// Add or remove objects on the <see cref="EndpointBuilder.Metadata"/> property of the <paramref name="builder"/> to modify the <see cref="Endpoint.Metadata"/> being built. | ||
/// </remarks> | ||
/// <param name="parameter">The <see cref="ParameterInfo"/> of the route handler delegate or MVC Action of the endpoint being created.</param> | ||
/// <param name="builder">The <see cref="EndpointBuilder"/> used to construct the endpoint for the given <paramref name="parameter"/>.</param> | ||
static abstract void PopulateMetadata(ParameterInfo parameter, EndpointBuilder builder); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
src/Http/Http.Extensions/src/EndpointParameterMetadataContext.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
src/Http/Http.Extensions/src/IEndpointParameterMetadataProvider.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.