ExceptionSummarizationServiceCollectionExtensions.AddExceptionSummarizer 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddExceptionSummarizer(IServiceCollection) |
将异常摘要生成器注册到依赖项注入容器中。 |
AddExceptionSummarizer(IServiceCollection, Action<IExceptionSummarizationBuilder>) |
将异常摘要生成器注册到依赖项注入容器中。 |
AddExceptionSummarizer(IServiceCollection)
将异常摘要生成器注册到依赖项注入容器中。
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
的值。
例外
services
为 null
。
适用于
AddExceptionSummarizer(IServiceCollection, Action<IExceptionSummarizationBuilder>)
将异常摘要生成器注册到依赖项注入容器中。
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
的值。
例外
services
或 configure
为 null
。