ExceptionHandlerMiddleware 构造函数

定义

重载

ExceptionHandlerMiddleware(RequestDelegate, ILoggerFactory, IOptions<ExceptionHandlerOptions>, DiagnosticListener)

创建一个新的 ExceptionHandlerMiddleware

ExceptionHandlerMiddleware(RequestDelegate, ILoggerFactory, IOptions<ExceptionHandlerOptions>, DiagnosticSource)

ExceptionHandlerMiddleware(RequestDelegate, ILoggerFactory, IOptions<ExceptionHandlerOptions>, DiagnosticListener)

Source:
ExceptionHandlerMiddleware.cs

创建一个新的 ExceptionHandlerMiddleware

public:
 ExceptionHandlerMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Builder::ExceptionHandlerOptions ^> ^ options, System::Diagnostics::DiagnosticListener ^ diagnosticListener);
public ExceptionHandlerMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.ExceptionHandlerOptions> options, System.Diagnostics.DiagnosticListener diagnosticListener);
new Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.ExceptionHandlerOptions> * System.Diagnostics.DiagnosticListener -> Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware
Public Sub New (next As RequestDelegate, loggerFactory As ILoggerFactory, options As IOptions(Of ExceptionHandlerOptions), diagnosticListener As DiagnosticListener)

参数

next
RequestDelegate

表示 RequestDelegate 管道中的下一个中间件的 。

loggerFactory
ILoggerFactory

ILoggerFactory用于日志记录的 。

options
IOptions<ExceptionHandlerOptions>

用于配置中间件的选项。

diagnosticListener
DiagnosticListener

DiagnosticListener用于编写诊断消息的 。

适用于

ExceptionHandlerMiddleware(RequestDelegate, ILoggerFactory, IOptions<ExceptionHandlerOptions>, DiagnosticSource)

Source:
ExceptionHandlerMiddleware.cs
Source:
ExceptionHandlerMiddleware.cs
public:
 ExceptionHandlerMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Builder::ExceptionHandlerOptions ^> ^ options, System::Diagnostics::DiagnosticSource ^ diagnosticSource);
public ExceptionHandlerMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.ExceptionHandlerOptions> options, System.Diagnostics.DiagnosticSource diagnosticSource);
new Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.ExceptionHandlerOptions> * System.Diagnostics.DiagnosticSource -> Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware
Public Sub New (next As RequestDelegate, loggerFactory As ILoggerFactory, options As IOptions(Of ExceptionHandlerOptions), diagnosticSource As DiagnosticSource)

参数

loggerFactory
ILoggerFactory
diagnosticSource
DiagnosticSource

适用于