Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
CreateObservableUpDownCounter<T>(String, Func<IEnumerable<Measurement<T>>>, String, String) |
Creates an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument that reports increasing or decreasing values when the instrument is being observed. |
CreateObservableUpDownCounter<T>(String, Func<Measurement<T>>, String, String) |
Creates an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument that reports increasing or decreasing values when the instrument is being observed. |
CreateObservableUpDownCounter<T>(String, Func<T>, String, String) |
Creates an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument that reports increasing or decreasing values when the instrument is being observed. |
CreateObservableUpDownCounter<T>(String, Func<IEnumerable<Measurement<T>>>, String, String, IEnumerable<KeyValuePair<String,Object>>) |
Create an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument which reports increasing or decreasing value(s) when the instrument is being observed. |
CreateObservableUpDownCounter<T>(String, Func<Measurement<T>>, String, String, IEnumerable<KeyValuePair<String,Object>>) |
Create an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument which reports increasing or decreasing value(s) when the instrument is being observed. |
CreateObservableUpDownCounter<T>(String, Func<T>, String, String, IEnumerable<KeyValuePair<String,Object>>) |
Create an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument which reports increasing or decreasing value(s) when the instrument is being observed. |
Creates an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument that reports increasing or decreasing values when the instrument is being observed.
public System.Diagnostics.Metrics.ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<System.Collections.Generic.IEnumerable<System.Diagnostics.Metrics.Measurement<T>>> observeValues, string? unit = default, string? description = default) where T : struct;
member this.CreateObservableUpDownCounter : string * Func<seq<System.Diagnostics.Metrics.Measurement<'T>>> * string * string -> System.Diagnostics.Metrics.ObservableUpDownCounter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableUpDownCounter(Of T As Structure) (name As String, observeValues As Func(Of IEnumerable(Of Measurement(Of T))), Optional unit As String = Nothing, Optional description As String = Nothing) As ObservableUpDownCounter(Of T)
The numerical type of the measurement.
The instrument name. Cannot be null
.
The callback to call to get the measurements when the Observe() is called by RecordObservableInstruments().
Optional instrument unit of measurements.
Optional instrument description.
A new observable up down counter.
Note
Unlike UpDownCounter which takes the increment/delta value, the callback function reports the absolute value of the ObservableUpDownCounter. To determine the reported rate the ObservableUpDownCounter is changing, the difference between successive measurements is used.
Example uses for ObservableUpDownCounter: the process heap size or the approximate number of items in a lock-free circular buffer.
Product | Versions |
---|---|
.NET | 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Framework | 4.6.2 (package-provided), 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
Creates an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument that reports increasing or decreasing values when the instrument is being observed.
public System.Diagnostics.Metrics.ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<System.Diagnostics.Metrics.Measurement<T>> observeValue, string? unit = default, string? description = default) where T : struct;
member this.CreateObservableUpDownCounter : string * Func<System.Diagnostics.Metrics.Measurement<'T>> * string * string -> System.Diagnostics.Metrics.ObservableUpDownCounter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableUpDownCounter(Of T As Structure) (name As String, observeValue As Func(Of Measurement(Of T)), Optional unit As String = Nothing, Optional description As String = Nothing) As ObservableUpDownCounter(Of T)
The numerical type of the measurement.
The instrument name. Cannot be null
.
The callback to call to get the measurements when the Observe() is called by RecordObservableInstruments()
Optional instrument unit of measurements.
Optional instrument description.
A new observable up down counter.
Note
Unlike UpDownCounter which takes the increment/delta value, the callback function reports the absolute value of the ObservableUpDownCounter. To determine the reported rate the ObservableUpDownCounter is changing, the difference between successive measurements is used.
Example uses for ObservableUpDownCounter: the process heap size or the approximate number of items in a lock-free circular buffer.
Product | Versions |
---|---|
.NET | 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Framework | 4.6.2 (package-provided), 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
Creates an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument that reports increasing or decreasing values when the instrument is being observed.
public System.Diagnostics.Metrics.ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<T> observeValue, string? unit = default, string? description = default) where T : struct;
member this.CreateObservableUpDownCounter : string * Func<'T (requires 'T : struct)> * string * string -> System.Diagnostics.Metrics.ObservableUpDownCounter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableUpDownCounter(Of T As Structure) (name As String, observeValue As Func(Of T), Optional unit As String = Nothing, Optional description As String = Nothing) As ObservableUpDownCounter(Of T)
The numerical type of the measurement.
The instrument name. Cannot be null
.
The callback to call to get the measurements when the Observe() is called by RecordObservableInstruments().
Optional instrument unit of measurements.
Optional instrument description.
A new observable up down counter.
Note
Unlike UpDownCounter which takes the increment/delta value, the callback function reports the absolute value of the ObservableUpDownCounter. To determine the reported rate the ObservableUpDownCounter is changing, the difference between successive measurements is used.
Example uses for ObservableUpDownCounter: the process heap size or the approximate number of items in a lock-free circular buffer.
Product | Versions |
---|---|
.NET | 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Framework | 4.6.2 (package-provided), 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
Create an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument which reports increasing or decreasing value(s) when the instrument is being observed.
public:
generic <typename T>
where T : value class System::Diagnostics::Metrics::ObservableUpDownCounter<T> ^ CreateObservableUpDownCounter(System::String ^ name, Func<System::Collections::Generic::IEnumerable<System::Diagnostics::Metrics::Measurement<T>> ^> ^ observeValues, System::String ^ unit, System::String ^ description, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>> ^ tags);
public System.Diagnostics.Metrics.ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<System.Collections.Generic.IEnumerable<System.Diagnostics.Metrics.Measurement<T>>> observeValues, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>> tags) where T : struct;
public System.Diagnostics.Metrics.ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<System.Collections.Generic.IEnumerable<System.Diagnostics.Metrics.Measurement<T>>> observeValues, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>>? tags) where T : struct;
member this.CreateObservableUpDownCounter : string * Func<seq<System.Diagnostics.Metrics.Measurement<'T>>> * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.ObservableUpDownCounter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableUpDownCounter(Of T As Structure) (name As String, observeValues As Func(Of IEnumerable(Of Measurement(Of T))), unit As String, description As String, tags As IEnumerable(Of KeyValuePair(Of String, Object))) As ObservableUpDownCounter(Of T)
The numerical type of the measurement.
The instrument name. Cannot be null
.
The callback to call to get the measurements when the Observe() is called by RecordObservableInstruments().
Optional instrument unit of measurements.
Optional instrument description.
tags to attach to the counter.
A new observable up down counter.
Note
Unlike UpDownCounter
, which takes the increment/delta value, the callback function reports the absolute value of the ObservableUpDownCounter
. To determine the reported rate the ObservableUpDownCounter
is changing, the difference between successive measurements is used.
Example uses for ObservableUpDownCounter
: the process heap size or the approximate number of items in a lock-free circular buffer.
Product | Versions |
---|---|
.NET | 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Framework | 4.6.2 (package-provided), 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
Create an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument which reports increasing or decreasing value(s) when the instrument is being observed.
public:
generic <typename T>
where T : value class System::Diagnostics::Metrics::ObservableUpDownCounter<T> ^ CreateObservableUpDownCounter(System::String ^ name, Func<System::Diagnostics::Metrics::Measurement<T>> ^ observeValue, System::String ^ unit, System::String ^ description, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>> ^ tags);
public System.Diagnostics.Metrics.ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<System.Diagnostics.Metrics.Measurement<T>> observeValue, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>> tags) where T : struct;
public System.Diagnostics.Metrics.ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<System.Diagnostics.Metrics.Measurement<T>> observeValue, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>>? tags) where T : struct;
member this.CreateObservableUpDownCounter : string * Func<System.Diagnostics.Metrics.Measurement<'T>> * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.ObservableUpDownCounter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableUpDownCounter(Of T As Structure) (name As String, observeValue As Func(Of Measurement(Of T)), unit As String, description As String, tags As IEnumerable(Of KeyValuePair(Of String, Object))) As ObservableUpDownCounter(Of T)
The numerical type of the measurement.
The instrument name. Cannot be null
.
The callback to call to get the measurements when the Observe() is called by RecordObservableInstruments()
Optional instrument unit of measurements.
Optional instrument description.
tags to attach to the counter.
A new observable up down counter.
Note
Unlike UpDownCounter which takes the increment/delta value, the callback function reports the absolute value of the ObservableUpDownCounter. To determine the reported rate the ObservableUpDownCounter is changing, the difference between successive measurements is used.
Example uses for ObservableUpDownCounter: the process heap size or the approximate number of items in a lock-free circular buffer.
Product | Versions |
---|---|
.NET | 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Framework | 4.6.2 (package-provided), 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
Create an ObservableUpDownCounter object. ObservableUpDownCounter is an Instrument which reports increasing or decreasing value(s) when the instrument is being observed.
public:
generic <typename T>
where T : value class System::Diagnostics::Metrics::ObservableUpDownCounter<T> ^ CreateObservableUpDownCounter(System::String ^ name, Func<T> ^ observeValue, System::String ^ unit, System::String ^ description, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>> ^ tags);
public System.Diagnostics.Metrics.ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<T> observeValue, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>> tags) where T : struct;
public System.Diagnostics.Metrics.ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<T> observeValue, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>>? tags) where T : struct;
member this.CreateObservableUpDownCounter : string * Func<'T (requires 'T : struct)> * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.ObservableUpDownCounter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateObservableUpDownCounter(Of T As Structure) (name As String, observeValue As Func(Of T), unit As String, description As String, tags As IEnumerable(Of KeyValuePair(Of String, Object))) As ObservableUpDownCounter(Of T)
The numerical type of the measurement.
The instrument name. Cannot be null
.
The callback to call to get the measurements when the Observe() is called by RecordObservableInstruments().
Optional instrument unit of measurements.
Optional instrument description.
tags to attach to the counter.
A new observable up down counter.
Note
Unlike UpDownCounter which takes the increment/delta value, the callback function reports the absolute value of the ObservableUpDownCounter. To determine the reported rate the ObservableUpDownCounter is changing, the difference between successive measurements is used.
Example uses for ObservableUpDownCounter: the process heap size or the approximate number of items in a lock-free circular buffer.
Product | Versions |
---|---|
.NET | 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Framework | 4.6.2 (package-provided), 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in