Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Agent.Metrics Namespace / SampledMetricDefinition Class / IsValidDataType Method
The typeof(SomeSpecificType) or dataValue.GetType() to check.

In This Topic
    IsValidDataType Method (SampledMetricDefinition)
    In This Topic
    Checks the provided Type against the list of recognized numeric types and special types supported for SampledMetric data.
    Syntax
    'Declaration
     
    
    Public Shared Function IsValidDataType( _
       ByVal userDataType As Type _
    ) As Boolean
    public static bool IsValidDataType( 
       Type userDataType
    )

    Parameters

    userDataType
    The typeof(SomeSpecificType) or dataValue.GetType() to check.

    Return Value

    True if Loupe supports sampled metric data samples with that Type, otherwise false.
    Remarks
    Sampled metrics require inherently numeric samples, so only data with a numeric Type or of a recognized Type which can be converted to a numeric value in a standard way can be sampled for a sampled metric counter. Supported numeric .NET types include: Double, Single, Decimal, Int64, UInt64, Int32, UInt32, Int16, and UInt16. The common time representation types: DateTime, DateTimeOffset, and TimeSpan are also supported by automatically taking their Ticks value. All sampled metric data samples are converted to a Double (double-precision floating point) value when sampled.
    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