Esempio n. 1
0
        internal static VirtualWanSecurityProviders DeserializeVirtualWanSecurityProviders(JsonElement element)
        {
            IReadOnlyList <VirtualWanSecurityProvider> supportedProviders = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("supportedProviders"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    List <VirtualWanSecurityProvider> array = new List <VirtualWanSecurityProvider>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        if (item.ValueKind == JsonValueKind.Null)
                        {
                            array.Add(null);
                        }
                        else
                        {
                            array.Add(VirtualWanSecurityProvider.DeserializeVirtualWanSecurityProvider(item));
                        }
                    }
                    supportedProviders = array;
                    continue;
                }
            }
            return(new VirtualWanSecurityProviders(supportedProviders));
        }
Esempio n. 2
0
        internal static VirtualWanSecurityProviders DeserializeVirtualWanSecurityProviders(JsonElement element)
        {
            Optional <IReadOnlyList <VirtualWanSecurityProvider> > supportedProviders = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("supportedProviders"))
                {
                    List <VirtualWanSecurityProvider> array = new List <VirtualWanSecurityProvider>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(VirtualWanSecurityProvider.DeserializeVirtualWanSecurityProvider(item));
                    }
                    supportedProviders = array;
                    continue;
                }
            }
            return(new VirtualWanSecurityProviders(Optional.ToList(supportedProviders)));
        }