internal static DiagnosticsProfile DeserializeDiagnosticsProfile(JsonElement element) { Optional <BootDiagnostics> bootDiagnostics = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("bootDiagnostics")) { bootDiagnostics = BootDiagnostics.DeserializeBootDiagnostics(property.Value); continue; } } return(new DiagnosticsProfile(bootDiagnostics.Value)); }
internal static DiagnosticsProfile DeserializeDiagnosticsProfile(JsonElement element) { BootDiagnostics bootDiagnostics = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("bootDiagnostics")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } bootDiagnostics = BootDiagnostics.DeserializeBootDiagnostics(property.Value); continue; } } return(new DiagnosticsProfile(bootDiagnostics)); }