Loupe - Log - Monitor - Resolve
Gibraltar.Agent.Metrics Namespace / SampledMetric Class / WriteSample Method / WriteSample(Object) Method
The object to retrieve metric values from.

In This Topic
    WriteSample(Object) Method
    In This Topic
    Write a sampled metric sample for this sampled metric instance using the provided data object.
    Syntax
    'Declaration
     
    
    Public Overloads Sub WriteSample( _
       ByVal metricData As Object _
    ) 
    public void WriteSample( 
       object metricData
    )

    Parameters

    metricData
    The object to retrieve metric values from.
    Exceptions
    ExceptionDescription
    The provided metricData object was null.
    This sampled metric's definition is not bound to sample automatically from a user data object. WriteSample(...) must be given the data values directly.
    -or-
    The provided user data object type ({0}) is not assignable to this sampled metric's bound type ({1}) and can not be sampled automatically for this metric instance.">
    Remarks
    The provided user data object must be assignable to the bound type which defined this sampled metric via attributes.
    Example
    For examples, see the Sampled Metric class overview.
    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