Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Agent.Metrics Namespace / EventMetricDefinition Class / Write Method / Write(Object) Method
A user data object defining event metrics by attributes on itself or its interfaces or any inherited type.

Write(Object) Method
Sample every event metric defined by EventMetric and EventMetricValue attributes on the provided data object at any interface or inheritance level.
Syntax
'Declaration
 
Public Overloads Shared Sub Write( _
   ByVal metricData As Object _
) 
 

Parameters

metricData
A user data object defining event metrics by attributes on itself or its interfaces or any inherited type.
Exceptions
ExceptionDescription
The specified metricDataObjectType does not have an EventMetric attribute

-or-

The specified Type does not have a usable EventMetric attribute, so it can't be used to define an event metric.

-or-

The specified Type's EventMetric has an empty metric namespace which is not allowed, so no metric can be defined.

-or-

The specified Type's EventMetric has an empty metric category name which is not allowed, so no metric can be defined.

-or-

The specified Type's EventMetric has an empty metric counter name which is not allowed, so no metric can be defined.

-or-

The specified Type's EventMetric attribute's 3-part Key is already used for a metric definition which is not an event metric.
Example
See the EventMetric Class Overview for an example.
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