MetricsBuilderExtensions.AddListener 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
AddListener(IMetricsBuilder, IMetricsListener) |
Registers a new IMetricsListener instance. |
AddListener<T>(IMetricsBuilder) |
Registers a new IMetricsListener of type |
AddListener(IMetricsBuilder, IMetricsListener)
Registers a new IMetricsListener instance.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Diagnostics::Metrics::IMetricsBuilder ^ AddListener(Microsoft::Extensions::Diagnostics::Metrics::IMetricsBuilder ^ builder, Microsoft::Extensions::Diagnostics::Metrics::IMetricsListener ^ listener);
public static Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder AddListener (this Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder builder, Microsoft.Extensions.Diagnostics.Metrics.IMetricsListener listener);
static member AddListener : Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder * Microsoft.Extensions.Diagnostics.Metrics.IMetricsListener -> Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder
<Extension()>
Public Function AddListener (builder As IMetricsBuilder, listener As IMetricsListener) As IMetricsBuilder
Parameters
- builder
- IMetricsBuilder
The IMetricsBuilder.
- listener
- IMetricsListener
The implementation type of the listener.
Returns
Returns the original IMetricsBuilder for chaining.
Applies to
AddListener<T>(IMetricsBuilder)
Registers a new IMetricsListener of type T
.
public:
generic <typename T>
where T : class, Microsoft::Extensions::Diagnostics::Metrics::IMetricsListener[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Diagnostics::Metrics::IMetricsBuilder ^ AddListener(Microsoft::Extensions::Diagnostics::Metrics::IMetricsBuilder ^ builder);
public static Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder AddListener<T> (this Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder builder) where T : class, Microsoft.Extensions.Diagnostics.Metrics.IMetricsListener;
static member AddListener : Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder -> Microsoft.Extensions.Diagnostics.Metrics.IMetricsBuilder (requires 'T : null and 'T :> Microsoft.Extensions.Diagnostics.Metrics.IMetricsListener)
<Extension()>
Public Function AddListener(Of T As {Class, IMetricsListener}) (builder As IMetricsBuilder) As IMetricsBuilder
Type Parameters
- T
The implementation type of the listener.
Parameters
- builder
- IMetricsBuilder
The IMetricsBuilder.
Returns
Returns the original IMetricsBuilder for chaining.
Applies to
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.