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
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.