Method ReportMetric
ReportMetric<T>(MetricDefinition, T[])
Reports a metric on this annotation. May only be called in the same frame as the annotation was reported.
Declaration
public void ReportMetric<T>(MetricDefinition metricDefinition, T[] values)
Parameters
| Type | Name | Description |
|---|---|---|
| MetricDefinition | metricDefinition | |
| T[] | values |
Type Parameters
| Name | Description |
|---|---|
| T |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if values is null |
| InvalidOperationException | Thrown if SensorHandle reports false for ShouldCaptureThisFrame. |
ReportMetric(MetricDefinition, string)
Reports a metric on this annotation. May only be called in the same frame as the annotation was reported.
Declaration
public void ReportMetric(MetricDefinition metricDefinition, string valuesJsonArray)
Parameters
| Type | Name | Description |
|---|---|---|
| MetricDefinition | metricDefinition | |
| string | valuesJsonArray | A string-based JSON array to be placed in the "values" field of the metric |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if values is null |
| InvalidOperationException | Thrown if SensorHandle reports false for ShouldCaptureThisFrame. |