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));
        }
예제 #2
0
        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));
        }