DatabaseErrorPageMiddleware 构造函数

定义

注意

This is obsolete and will be removed in a future version. Use DatabaseDeveloperPageExceptionFilter instead, see documentation at https://aka.ms/DatabaseDeveloperPageExceptionFilter.

初始化 DatabaseErrorPageMiddleware 类的新实例。

public:
 DatabaseErrorPageMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Builder::DatabaseErrorPageOptions ^> ^ options);
public DatabaseErrorPageMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.DatabaseErrorPageOptions> options);
[System.Obsolete("This is obsolete and will be removed in a future version. Use DatabaseDeveloperPageExceptionFilter instead, see documentation at https://aka.ms/DatabaseDeveloperPageExceptionFilter.")]
public DatabaseErrorPageMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.DatabaseErrorPageOptions> options);
new Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.DatabaseErrorPageOptions> -> Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware
[<System.Obsolete("This is obsolete and will be removed in a future version. Use DatabaseDeveloperPageExceptionFilter instead, see documentation at https://aka.ms/DatabaseDeveloperPageExceptionFilter.")>]
new Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.DatabaseErrorPageOptions> -> Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware
Public Sub New (next As RequestDelegate, loggerFactory As ILoggerFactory, options As IOptions(Of DatabaseErrorPageOptions))

参数

next
RequestDelegate

委托以执行请求管道中的下一个中间件。

loggerFactory
ILoggerFactory

ILoggerFactory应用程序的 。 此中间件会生成日志记录消息并使用它们来检测与数据库相关的异常。

options
IOptions<DatabaseErrorPageOptions>

用于控制错误页上显示的信息的选项。

属性

适用于