示例#1
0
        internal static DomainCollection DeserializeDomainCollection(JsonElement element)
        {
            IReadOnlyList <AppServiceDomainData> value = default;
            Optional <string> nextLink = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    List <AppServiceDomainData> array = new List <AppServiceDomainData>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(AppServiceDomainData.DeserializeAppServiceDomainData(item));
                    }
                    value = array;
                    continue;
                }
                if (property.NameEquals("nextLink"))
                {
                    nextLink = property.Value.GetString();
                    continue;
                }
            }
            return(new DomainCollection(value, nextLink.Value));
        }
示例#2
0
        AppServiceDomain IOperationSource <AppServiceDomain> .CreateResult(Response response, CancellationToken cancellationToken)
        {
            using var document = JsonDocument.Parse(response.ContentStream);
            var data = AppServiceDomainData.DeserializeAppServiceDomainData(document.RootElement);

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