Exemple #1
0
        internal static SiteExtensionInfoCollection DeserializeSiteExtensionInfoCollection(JsonElement element)
        {
            IReadOnlyList <SiteExtensionInfoData> value = default;
            Optional <string> nextLink = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    List <SiteExtensionInfoData> array = new List <SiteExtensionInfoData>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(SiteExtensionInfoData.DeserializeSiteExtensionInfoData(item));
                    }
                    value = array;
                    continue;
                }
                if (property.NameEquals("nextLink"))
                {
                    nextLink = property.Value.GetString();
                    continue;
                }
            }
            return(new SiteExtensionInfoCollection(value, nextLink.Value));
        }
        SiteSlotSiteextension IOperationSource <SiteSlotSiteextension> .CreateResult(Response response, CancellationToken cancellationToken)
        {
            using var document = JsonDocument.Parse(response.ContentStream);
            var data = SiteExtensionInfoData.DeserializeSiteExtensionInfoData(document.RootElement);

            return(new SiteSlotSiteextension(_armClient, data));
        }