internal static MetricAlertResourceCollection DeserializeMetricAlertResourceCollection(JsonElement element) { Optional <IReadOnlyList <MetricAlertData> > value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <MetricAlertData> array = new List <MetricAlertData>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(MetricAlertData.DeserializeMetricAlertData(item)); } value = array; continue; } } return(new MetricAlertResourceCollection(Optional.ToList(value))); }
public static void AssertMetricAlert(MetricAlertData data1, MetricAlertData data2) { AssertTrackedResource(data1, data2); Assert.AreEqual(data1.Description, data2.Description); }