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

Remove Obsolete constructor in RequestLocalizationMiddleware

上级 c202344d
No related branches found
No related tags found
无相关合并请求
...@@ -36,7 +36,6 @@ namespace Microsoft.AspNetCore.Localization ...@@ -36,7 +36,6 @@ namespace Microsoft.AspNetCore.Localization
/// <param name="options">The <see cref="RequestLocalizationOptions"/> representing the options for the /// <param name="options">The <see cref="RequestLocalizationOptions"/> representing the options for the
/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> /// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param>
/// <see cref="RequestLocalizationMiddleware"/>.</param> /// <see cref="RequestLocalizationMiddleware"/>.</param>
[ActivatorUtilitiesConstructor]
public RequestLocalizationMiddleware(RequestDelegate next, IOptions<RequestLocalizationOptions> options, ILoggerFactory loggerFactory) public RequestLocalizationMiddleware(RequestDelegate next, IOptions<RequestLocalizationOptions> options, ILoggerFactory loggerFactory)
{ {
if (options == null) if (options == null)
...@@ -49,18 +48,6 @@ namespace Microsoft.AspNetCore.Localization ...@@ -49,18 +48,6 @@ namespace Microsoft.AspNetCore.Localization
_options = options.Value; _options = options.Value;
} }
/// <summary>
/// Creates a new <see cref="RequestLocalizationMiddleware"/>.
/// </summary>
/// <param name="next">The <see cref="RequestDelegate"/> representing the next middleware in the pipeline.</param>
/// <param name="options">The <see cref="RequestLocalizationOptions"/> representing the options for the
/// <see cref="RequestLocalizationMiddleware"/>.</param>
[Obsolete("This constructor is obsolete and will be removed in a future version. Use RequestLocalizationMiddleware(RequestDelegate next, IOptions<RequestLocalizationOptions> options, ILoggerFactory loggerFactory) instead")]
public RequestLocalizationMiddleware(RequestDelegate next, IOptions<RequestLocalizationOptions> options)
: this(next, options, NullLoggerFactory.Instance)
{
}
/// <summary> /// <summary>
/// Invokes the logic of the middleware. /// Invokes the logic of the middleware.
/// </summary> /// </summary>
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册