ExceptionSummarizationServiceCollectionExtensions.AddExceptionSummarizer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddExceptionSummarizer(IServiceCollection) |
Registers an exception summarizer into a dependency injection container. |
AddExceptionSummarizer(IServiceCollection, Action<IExceptionSummarizationBuilder>) |
Registers an exception summarizer into a dependency injection container. |
AddExceptionSummarizer(IServiceCollection)
Registers an exception summarizer into a dependency injection container.
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
Parameters
- services
- IServiceCollection
The dependency injection container to add the summarizer to.
Returns
The value of services
.
Exceptions
services
is null
.
Applies to
AddExceptionSummarizer(IServiceCollection, Action<IExceptionSummarizationBuilder>)
Registers an exception summarizer into a dependency injection container.
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
Parameters
- services
- IServiceCollection
The dependency injection container to add the summarizer to.
- configure
- Action<IExceptionSummarizationBuilder>
Delegates that configures the set of registered summary providers.
Returns
The value of services
.
Exceptions
services
or configure
is null
.