Skip to content
代码片段 群组 项目
未验证 提交 15fa3ad1 编辑于 作者: Safia Abdalla's avatar Safia Abdalla 提交者: GitHub
浏览文件

Update SDK to 7.0.100-preview.2.22078.1 (#39895)


* Update SDK to 7.0.100-preview.2.22078.1

* Fix formatting issues

* Update HubEndpointRouteBuilderExtensions.cs

Co-authored-by: default avatarPranav K <prkrishn@hotmail.com>
上级 2802fa82
No related branches found
No related tags found
无相关合并请求
{ {
"sdk": { "sdk": {
"version": "7.0.100-alpha.1.22071.3" "version": "7.0.100-preview.2.22078.1"
}, },
"tools": { "tools": {
"dotnet": "7.0.100-alpha.1.22071.3", "dotnet": "7.0.100-preview.2.22078.1",
"runtimes": { "runtimes": {
"dotnet": [ "dotnet": [
"2.1.30", "2.1.30",
......
...@@ -128,7 +128,7 @@ public class RouteOptions ...@@ -128,7 +128,7 @@ public class RouteOptions
/// </summary> /// </summary>
/// <typeparam name="T">The parameter policy type.</typeparam> /// <typeparam name="T">The parameter policy type.</typeparam>
/// <param name="token">The route token used to apply the parameter policy.</param> /// <param name="token">The route token used to apply the parameter policy.</param>
public void SetParameterPolicy<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]T>(string token) where T : IParameterPolicy public void SetParameterPolicy<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T>(string token) where T : IParameterPolicy
{ {
ConstraintMap[token] = typeof(T); ConstraintMap[token] = typeof(T);
} }
...@@ -149,7 +149,7 @@ public class RouteOptions ...@@ -149,7 +149,7 @@ public class RouteOptions
ConstraintMap[token] = type; ConstraintMap[token] = type;
} }
private static void AddConstraint<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]TConstraint>(Dictionary<string, Type> constraintMap, string text) where TConstraint : IRouteConstraint private static void AddConstraint<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TConstraint>(Dictionary<string, Type> constraintMap, string text) where TConstraint : IRouteConstraint
{ {
constraintMap[text] = typeof(TConstraint); constraintMap[text] = typeof(TConstraint);
} }
......
...@@ -476,7 +476,7 @@ public class EndpointMetadataApiDescriptionProviderTest ...@@ -476,7 +476,7 @@ public class EndpointMetadataApiDescriptionProviderTest
[Fact] [Fact]
public void AddsMetadataFromRouteEndpoint() public void AddsMetadataFromRouteEndpoint()
{ {
var apiDescription = GetApiDescription([ApiExplorerSettings(IgnoreApi = true)]() => { }); var apiDescription = GetApiDescription([ApiExplorerSettings(IgnoreApi = true)] () => { });
Assert.NotEmpty(apiDescription.ActionDescriptor.EndpointMetadata); Assert.NotEmpty(apiDescription.ActionDescriptor.EndpointMetadata);
...@@ -763,7 +763,7 @@ public class EndpointMetadataApiDescriptionProviderTest ...@@ -763,7 +763,7 @@ public class EndpointMetadataApiDescriptionProviderTest
{ {
// Arrange // Arrange
var builder = CreateBuilder(); var builder = CreateBuilder();
builder.MapGet("/api/todos", [ProducesResponseType(typeof(List<string>), StatusCodes.Status200OK)]() => "") builder.MapGet("/api/todos", [ProducesResponseType(typeof(List<string>), StatusCodes.Status200OK)] () => "")
.Produces<InferredJsonClass>(StatusCodes.Status200OK); .Produces<InferredJsonClass>(StatusCodes.Status200OK);
var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>());
......
...@@ -25,7 +25,7 @@ public class AuthenticationBuilder ...@@ -25,7 +25,7 @@ public class AuthenticationBuilder
/// </summary> /// </summary>
public virtual IServiceCollection Services { get; } public virtual IServiceCollection Services { get; }
private AuthenticationBuilder AddSchemeHelper<TOptions, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]THandler>(string authenticationScheme, string? displayName, Action<TOptions>? configureOptions) private AuthenticationBuilder AddSchemeHelper<TOptions, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] THandler>(string authenticationScheme, string? displayName, Action<TOptions>? configureOptions)
where TOptions : AuthenticationSchemeOptions, new() where TOptions : AuthenticationSchemeOptions, new()
where THandler : class, IAuthenticationHandler where THandler : class, IAuthenticationHandler
{ {
...@@ -59,7 +59,7 @@ public class AuthenticationBuilder ...@@ -59,7 +59,7 @@ public class AuthenticationBuilder
/// <param name="displayName">The display name of this scheme.</param> /// <param name="displayName">The display name of this scheme.</param>
/// <param name="configureOptions">Used to configure the scheme options.</param> /// <param name="configureOptions">Used to configure the scheme options.</param>
/// <returns>The builder.</returns> /// <returns>The builder.</returns>
public virtual AuthenticationBuilder AddScheme<TOptions, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]THandler>(string authenticationScheme, string? displayName, Action<TOptions>? configureOptions) public virtual AuthenticationBuilder AddScheme<TOptions, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] THandler>(string authenticationScheme, string? displayName, Action<TOptions>? configureOptions)
where TOptions : AuthenticationSchemeOptions, new() where TOptions : AuthenticationSchemeOptions, new()
where THandler : AuthenticationHandler<TOptions> where THandler : AuthenticationHandler<TOptions>
=> AddSchemeHelper<TOptions, THandler>(authenticationScheme, displayName, configureOptions); => AddSchemeHelper<TOptions, THandler>(authenticationScheme, displayName, configureOptions);
...@@ -72,7 +72,7 @@ public class AuthenticationBuilder ...@@ -72,7 +72,7 @@ public class AuthenticationBuilder
/// <param name="authenticationScheme">The name of this scheme.</param> /// <param name="authenticationScheme">The name of this scheme.</param>
/// <param name="configureOptions">Used to configure the scheme options.</param> /// <param name="configureOptions">Used to configure the scheme options.</param>
/// <returns>The builder.</returns> /// <returns>The builder.</returns>
public virtual AuthenticationBuilder AddScheme<TOptions, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]THandler>(string authenticationScheme, Action<TOptions>? configureOptions) public virtual AuthenticationBuilder AddScheme<TOptions, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] THandler>(string authenticationScheme, Action<TOptions>? configureOptions)
where TOptions : AuthenticationSchemeOptions, new() where TOptions : AuthenticationSchemeOptions, new()
where THandler : AuthenticationHandler<TOptions> where THandler : AuthenticationHandler<TOptions>
=> AddScheme<TOptions, THandler>(authenticationScheme, displayName: null, configureOptions: configureOptions); => AddScheme<TOptions, THandler>(authenticationScheme, displayName: null, configureOptions: configureOptions);
...@@ -87,7 +87,7 @@ public class AuthenticationBuilder ...@@ -87,7 +87,7 @@ public class AuthenticationBuilder
/// <param name="displayName">The display name of this scheme.</param> /// <param name="displayName">The display name of this scheme.</param>
/// <param name="configureOptions">Used to configure the scheme options.</param> /// <param name="configureOptions">Used to configure the scheme options.</param>
/// <returns>The builder.</returns> /// <returns>The builder.</returns>
public virtual AuthenticationBuilder AddRemoteScheme<TOptions, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]THandler>(string authenticationScheme, string? displayName, Action<TOptions>? configureOptions) public virtual AuthenticationBuilder AddRemoteScheme<TOptions, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] THandler>(string authenticationScheme, string? displayName, Action<TOptions>? configureOptions)
where TOptions : RemoteAuthenticationOptions, new() where TOptions : RemoteAuthenticationOptions, new()
where THandler : RemoteAuthenticationHandler<TOptions> where THandler : RemoteAuthenticationHandler<TOptions>
{ {
......
...@@ -42,7 +42,7 @@ public static class OAuthExtensions ...@@ -42,7 +42,7 @@ public static class OAuthExtensions
/// <param name="authenticationScheme">The authentication scheme.</param> /// <param name="authenticationScheme">The authentication scheme.</param>
/// <param name="configureOptions">A delegate to configure the handler specific options.</param> /// <param name="configureOptions">A delegate to configure the handler specific options.</param>
/// <returns>A reference to <paramref name="builder"/> after the operation has completed.</returns> /// <returns>A reference to <paramref name="builder"/> after the operation has completed.</returns>
public static AuthenticationBuilder AddOAuth<TOptions, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]THandler>(this AuthenticationBuilder builder, string authenticationScheme, Action<TOptions> configureOptions) public static AuthenticationBuilder AddOAuth<TOptions, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] THandler>(this AuthenticationBuilder builder, string authenticationScheme, Action<TOptions> configureOptions)
where TOptions : OAuthOptions, new() where TOptions : OAuthOptions, new()
where THandler : OAuthHandler<TOptions> where THandler : OAuthHandler<TOptions>
=> builder.AddOAuth<TOptions, THandler>(authenticationScheme, OAuthDefaults.DisplayName, configureOptions); => builder.AddOAuth<TOptions, THandler>(authenticationScheme, OAuthDefaults.DisplayName, configureOptions);
...@@ -55,7 +55,7 @@ public static class OAuthExtensions ...@@ -55,7 +55,7 @@ public static class OAuthExtensions
/// <param name="displayName">A display name for the authentication handler.</param> /// <param name="displayName">A display name for the authentication handler.</param>
/// <param name="configureOptions">A delegate to configure the handler specific options.</param> /// <param name="configureOptions">A delegate to configure the handler specific options.</param>
/// <returns>A reference to <paramref name="builder"/> after the operation has completed.</returns> /// <returns>A reference to <paramref name="builder"/> after the operation has completed.</returns>
public static AuthenticationBuilder AddOAuth<TOptions, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]THandler>(this AuthenticationBuilder builder, string authenticationScheme, string displayName, Action<TOptions> configureOptions) public static AuthenticationBuilder AddOAuth<TOptions, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] THandler>(this AuthenticationBuilder builder, string authenticationScheme, string displayName, Action<TOptions> configureOptions)
where TOptions : OAuthOptions, new() where TOptions : OAuthOptions, new()
where THandler : OAuthHandler<TOptions> where THandler : OAuthHandler<TOptions>
{ {
......
...@@ -34,7 +34,7 @@ public static class HubOptionsExtensions ...@@ -34,7 +34,7 @@ public static class HubOptionsExtensions
/// </summary> /// </summary>
/// <typeparam name="TFilter">The <see cref="IHubFilter"/> type that will be added to the options.</typeparam> /// <typeparam name="TFilter">The <see cref="IHubFilter"/> type that will be added to the options.</typeparam>
/// <param name="options">The options to add a filter to.</param> /// <param name="options">The options to add a filter to.</param>
public static void AddFilter<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]TFilter>(this HubOptions options) where TFilter : IHubFilter public static void AddFilter<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TFilter>(this HubOptions options) where TFilter : IHubFilter
{ {
_ = options ?? throw new ArgumentNullException(nameof(options)); _ = options ?? throw new ArgumentNullException(nameof(options));
......
...@@ -20,7 +20,7 @@ public static class SignalRConnectionBuilderExtensions ...@@ -20,7 +20,7 @@ public static class SignalRConnectionBuilderExtensions
/// <typeparam name="THub">The <see cref="Hub"/> type to host on the connection.</typeparam> /// <typeparam name="THub">The <see cref="Hub"/> type to host on the connection.</typeparam>
/// <param name="connectionBuilder">The connection to configure.</param> /// <param name="connectionBuilder">The connection to configure.</param>
/// <returns>The same instance of the <see cref="IConnectionBuilder"/> for chaining.</returns> /// <returns>The same instance of the <see cref="IConnectionBuilder"/> for chaining.</returns>
public static IConnectionBuilder UseHub<[DynamicallyAccessedMembers(HubAccessibility)]THub>(this IConnectionBuilder connectionBuilder) where THub : Hub public static IConnectionBuilder UseHub<[DynamicallyAccessedMembers(HubAccessibility)] THub>(this IConnectionBuilder connectionBuilder) where THub : Hub
{ {
var marker = connectionBuilder.ApplicationServices.GetService(typeof(SignalRCoreMarkerService)); var marker = connectionBuilder.ApplicationServices.GetService(typeof(SignalRCoreMarkerService));
if (marker == null) if (marker == null)
......
...@@ -23,7 +23,7 @@ public static class HubEndpointRouteBuilderExtensions ...@@ -23,7 +23,7 @@ public static class HubEndpointRouteBuilderExtensions
/// <param name="endpoints">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param> /// <param name="endpoints">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param>
/// <param name="pattern">The route pattern.</param> /// <param name="pattern">The route pattern.</param>
/// <returns>An <see cref="HubEndpointConventionBuilder"/> for endpoints associated with the connections.</returns> /// <returns>An <see cref="HubEndpointConventionBuilder"/> for endpoints associated with the connections.</returns>
public static HubEndpointConventionBuilder MapHub<[DynamicallyAccessedMembers(HubAccessibility)]THub>(this IEndpointRouteBuilder endpoints, string pattern) where THub : Hub public static HubEndpointConventionBuilder MapHub<[DynamicallyAccessedMembers(HubAccessibility)] THub>(this IEndpointRouteBuilder endpoints, string pattern) where THub : Hub
{ {
return endpoints.MapHub<THub>(pattern, configureOptions: null); return endpoints.MapHub<THub>(pattern, configureOptions: null);
} }
...@@ -36,7 +36,7 @@ public static class HubEndpointRouteBuilderExtensions ...@@ -36,7 +36,7 @@ public static class HubEndpointRouteBuilderExtensions
/// <param name="pattern">The route pattern.</param> /// <param name="pattern">The route pattern.</param>
/// <param name="configureOptions">A callback to configure dispatcher options.</param> /// <param name="configureOptions">A callback to configure dispatcher options.</param>
/// <returns>An <see cref="HubEndpointConventionBuilder"/> for endpoints associated with the connections.</returns> /// <returns>An <see cref="HubEndpointConventionBuilder"/> for endpoints associated with the connections.</returns>
public static HubEndpointConventionBuilder MapHub<[DynamicallyAccessedMembers(HubAccessibility)]THub>(this IEndpointRouteBuilder endpoints, string pattern, Action<HttpConnectionDispatcherOptions>? configureOptions) where THub : Hub public static HubEndpointConventionBuilder MapHub<[DynamicallyAccessedMembers(HubAccessibility)] THub>(this IEndpointRouteBuilder endpoints, string pattern, Action<HttpConnectionDispatcherOptions>? configureOptions) where THub : Hub
{ {
var marker = endpoints.ServiceProvider.GetService<SignalRMarkerService>(); var marker = endpoints.ServiceProvider.GetService<SignalRMarkerService>();
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册