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

In This Topic
    AddOrGet(MetricDefinitionCollection,String,String,String) Method
    In This Topic
    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 definitions As MetricDefinitionCollection, _
       ByVal metricTypeName As String, _
       ByVal categoryName As String, _
       ByVal counterName As String _
    ) As EventMetricDefinition
    public static EventMetricDefinition AddOrGet( 
       MetricDefinitionCollection definitions,
       string metricTypeName,
       string categoryName,
       string counterName
    )

    Parameters

    definitions
    The definitions dictionary this definition is a part of
    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 a Custom Sampled Metric (or a derived class) an exception will be thrown. Definitions are looked up and added to the provided definitions dictionary.
    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