Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Agent.Metrics Namespace / EventMetricSample Class / SetValue Method / SetValue(EventMetricValueDefinition,Object) Method
The metric value definition object of the value to be recorded.
Optional. The value to be recorded.

SetValue(EventMetricValueDefinition,Object) Method
Records a value to the values array of this sample given its value definition.
Syntax
'Declaration
 
Public Overloads Sub SetValue( _
   ByVal valueDefinition As EventMetricValueDefinition, _
   ByVal value As Object _
) 
 

Parameters

valueDefinition
The metric value definition object of the value to be recorded.
value
Optional. The value to be recorded.
Exceptions
ExceptionDescription
Throw if the valueDefinition is null.
Remarks
The value must be defined as part of the event metric definition associated with this sample or an exception will be thrown. The data type must also be compatible with the data type configured on the event metric definition or no data will be recorded. If called more than once for the same value, the prior value will be replaced.
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