예제 #1
0
        StaticSiteBuildUserProvidedFunctionApp IOperationSource <StaticSiteBuildUserProvidedFunctionApp> .CreateResult(Response response, CancellationToken cancellationToken)
        {
            using var document = JsonDocument.Parse(response.ContentStream);
            var data = StaticSiteUserProvidedFunctionAppARMResourceData.DeserializeStaticSiteUserProvidedFunctionAppARMResourceData(document.RootElement);

            return(new StaticSiteBuildUserProvidedFunctionApp(_armClient, data));
        }
예제 #2
0
        internal static StaticSiteUserProvidedFunctionAppsCollection DeserializeStaticSiteUserProvidedFunctionAppsCollection(JsonElement element)
        {
            IReadOnlyList <StaticSiteUserProvidedFunctionAppARMResourceData> value = default;
            Optional <string> nextLink = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    List <StaticSiteUserProvidedFunctionAppARMResourceData> array = new List <StaticSiteUserProvidedFunctionAppARMResourceData>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(StaticSiteUserProvidedFunctionAppARMResourceData.DeserializeStaticSiteUserProvidedFunctionAppARMResourceData(item));
                    }
                    value = array;
                    continue;
                }
                if (property.NameEquals("nextLink"))
                {
                    nextLink = property.Value.GetString();
                    continue;
                }
            }
            return(new StaticSiteUserProvidedFunctionAppsCollection(value, nextLink.Value));
        }
예제 #3
0
 AppService.StaticSiteUserProvidedFunctionApp IOperationSource <AppService.StaticSiteUserProvidedFunctionApp> .CreateResult(Response response, CancellationToken cancellationToken)
 {
     using var document = JsonDocument.Parse(response.ContentStream);
     return(new AppService.StaticSiteUserProvidedFunctionApp(_operationBase, StaticSiteUserProvidedFunctionAppARMResourceData.DeserializeStaticSiteUserProvidedFunctionAppARMResourceData(document.RootElement)));
 }