Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Monitor Namespace / EventMetricDefinition Class / AddOrGet Method / AddOrGet(String,String,String) Method
The unique metric type
The name of the category with which this definition is associated.
The name of the definition within the category.

AddOrGet(String,String,String) Method
Creates a new metric definition from the provided information, or returns an existing matching definition if found.
Syntax
'Declaration
 
Public Overloads Shared Function AddOrGet( _
   ByVal metricTypeName As String, _
   ByVal categoryName As String, _
   ByVal counterName As String _
) As EventMetricDefinition
 

Parameters

metricTypeName
The unique metric type
categoryName
The name of the category with which this definition is associated.
counterName
The name of the definition within the category.
Remarks
If the metric definition doesn't exist, it will be created. If the metric definition does exist, but is not an Event Metric an exception will be thrown. Definitions are looked up and added to the active logging metrics collection (Log.Metrics)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also