Пример #1
0
        internal static StorageSkuListResult DeserializeStorageSkuListResult(JsonElement element)
        {
            IReadOnlyList <SkuInformation> value = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    List <SkuInformation> array = new List <SkuInformation>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        if (item.ValueKind == JsonValueKind.Null)
                        {
                            array.Add(null);
                        }
                        else
                        {
                            array.Add(SkuInformation.DeserializeSkuInformation(item));
                        }
                    }
                    value = array;
                    continue;
                }
            }
            return(new StorageSkuListResult(value));
        }
        internal static StorageSkuListResult DeserializeStorageSkuListResult(JsonElement element)
        {
            Optional <IReadOnlyList <SkuInformation> > value = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    List <SkuInformation> array = new List <SkuInformation>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(SkuInformation.DeserializeSkuInformation(item));
                    }
                    value = array;
                    continue;
                }
            }
            return(new StorageSkuListResult(Optional.ToList(value)));
        }