internal static SiteConfigResourceCollection DeserializeSiteConfigResourceCollection(JsonElement element)
        {
            IReadOnlyList <SiteConfigData> value = default;
            Optional <string> nextLink           = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    List <SiteConfigData> array = new List <SiteConfigData>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(SiteConfigData.DeserializeSiteConfigData(item));
                    }
                    value = array;
                    continue;
                }
                if (property.NameEquals("nextLink"))
                {
                    nextLink = property.Value.GetString();
                    continue;
                }
            }
            return(new SiteConfigResourceCollection(value, nextLink.Value));
        }
        public static SiteConfigData GetBasicSiteConfigResourceData(AzureLocation location, string description = null)
        {
            /*IDictionary<string, IList<string>> header = new ChangeTrackingDictionary<string, IList<string>>();
             * IList<string> ipAddress = new List<string>();
             * ipAddress.Add("Any");
             * IList<string> action = new List<string>();
             * action.Add("Allow");
             * IList<string> priority = new List<string>();
             * priority.Add("1");
             * IList<string> name = new List<string>();
             * name.Add("Allow all");
             * IList<string> descriptionlist = new List<string>();
             * descriptionlist.Add("Allow all accesss");
             * header.Add("ip_adddress", ipAddress);
             * header.Add("action", action);
             * header.Add("priority", priority);
             * header.Add("name", name);
             * header.Add("description",descriptionlist);*/
            var data = new SiteConfigData()
            {
                DefaultDocuments =
                {
                    "Default.htm",
                    "Default.html",
                    "Default.asp",
                    "index.htm",
                    "index.html",
                    "iisstart.htm",
                    "default.aspx",
                    "index.php",
                    "hostingstart.html"
                },
                IpSecurityRestrictions =
                {
                    new IpSecurityRestriction
                    {
                        IpAddress   = "Any",
                        Action      = "Allow",
                        Priority    = 1,
                        Name        = "Allow all",
                        Description = "Allow all access"
                    }
                },
                ScmIpSecurityRestrictions =
                {
                    new IpSecurityRestriction
                    {
                        IpAddress   = "Any",
                        Action      = "Allow",
                        Priority    = 1,
                        Name        = "Allow all",
                        Description = "Allow all access"
                    }
                },
                VirtualApplications =
                {
                    new VirtualApplication
                    {
                        VirtualPath    = "/",
                        PhysicalPath   = "site\\wwwroot",
                        PreloadEnabled = true
                    }
                }
            };

            return(data);
        }
 public static void AssertSiteSlotConfigWeb(SiteConfigData site1, SiteConfigData site2)
 {
     //AssertTrackedResource(site1, site2);
     Assert.AreEqual(site1.AppSettings, site2.AppSettings);
 }