ExceptionSummarizationServiceCollectionExtensions.AddExceptionSummarizer 方法

定义

重载

AddExceptionSummarizer(IServiceCollection)

将异常摘要生成器注册到依赖项注入容器中。

AddExceptionSummarizer(IServiceCollection, Action<IExceptionSummarizationBuilder>)

将异常摘要生成器注册到依赖项注入容器中。

AddExceptionSummarizer(IServiceCollection)

Source:
ExceptionSummarizationServiceCollectionExtensions.cs

将异常摘要生成器注册到依赖项注入容器中。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddExceptionSummarizer(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddExceptionSummarizer (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddExceptionSummarizer : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddExceptionSummarizer (services As IServiceCollection) As IServiceCollection

参数

services
IServiceCollection

要向其添加摘要生成器的依赖项注入容器。

返回

services 的值。

例外

servicesnull

适用于

AddExceptionSummarizer(IServiceCollection, Action<IExceptionSummarizationBuilder>)

Source:
ExceptionSummarizationServiceCollectionExtensions.cs

将异常摘要生成器注册到依赖项注入容器中。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddExceptionSummarizer(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Diagnostics::ExceptionSummarization::IExceptionSummarizationBuilder ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddExceptionSummarizer (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Diagnostics.ExceptionSummarization.IExceptionSummarizationBuilder> configure);
static member AddExceptionSummarizer : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Diagnostics.ExceptionSummarization.IExceptionSummarizationBuilder> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddExceptionSummarizer (services As IServiceCollection, configure As Action(Of IExceptionSummarizationBuilder)) As IServiceCollection

参数

services
IServiceCollection

要向其添加摘要生成器的依赖项注入容器。

configure
Action<IExceptionSummarizationBuilder>

配置已注册摘要提供程序集的委托。

返回

services 的值。

例外

servicesconfigurenull

适用于