Method ReportMetric
ReportMetric<T>(MetricDefinition, T[])
Report a metric regarding this sensor in the current frame.
Declaration
public void ReportMetric<T>(MetricDefinition metricDefinition, T[] values)
Parameters
| Type | Name | Description |
|---|---|---|
| MetricDefinition | metricDefinition | The MetricDefinition of the metric. |
| T[] | values | An array to be converted to json and put in the "values" field of the metric |
Type Parameters
| Name | Description |
|---|---|
| T | The value type |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if values is null |
| InvalidOperationException | Thrown if ShouldCaptureThisFrame is false. |
ReportMetric(MetricDefinition, string)
Report a metric regarding this sensor in the current frame.
Declaration
public void ReportMetric(MetricDefinition metricDefinition, string valuesJsonArray)
Parameters
| Type | Name | Description |
|---|---|---|
| MetricDefinition | metricDefinition | The MetricDefinition of the metric. |
| 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 ShouldCaptureThisFrame is false. |